"Possible" bug when calling StdCall PBLibrary func

Everything else that doesn't fall into one of the other PB categories.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

"Possible" bug when calling StdCall PBLibrary func

Post by El_Choni »

Using this as library source:

Code: Select all

format MS COFF

Public PB_Test

Extrn _MessageBoxA@16

section '.text' code readable executable

PB_Test:
  mov eax, [esp+4]
  push 0
  push eax
  push eax
  push 0
  call _MessageBoxA@16
  ret 4
And this as .Desc file (note the StdCall flag):

Code: Select all

ASM
;
1
USER32
;
OBJ
;
0
;
Test.chm
;
Test,String, (String.s)
None | StdCall
;
Works when called through a variable:

Code: Select all

text.s = "This is "+Str(1)+" test"
Test(text)
But fails if the composed string is given directly as an argument:

Code: Select all

Test("This is "+Str(1)+" test")
(BTW, this is the reason I haven't released TailBite yet...)
El_Choni