Page 1 of 1
[FIXED] Procedure returning incorrect string
Posted: Wed Apr 09, 2008 9:29 am
by Mistrel
This is totally bizarre. The TBTest procedure is reporting the string that's returned by GetErrorModuleName() and not what is specified by ProcedureReturn. This is all under PureBasic 4.10.
Tailbite source:
Code: Select all
ProcedureDLL.s TBTest(String.s)
ProcedureReturn ""
EndProcedure
Program source:
Code: Select all
Procedure ErrorHandler()
MessageRequester("Error",TBTest(GetErrorModuleName()))
End
EndProcedure
OnErrorGosub(@ErrorHandler())
n=1
r=0
n/r
Posted: Wed Apr 09, 2008 10:42 am
by DoubleDutch
Posted: Wed Apr 09, 2008 6:57 pm
by Mistrel
I don't think so. That error is completely different and is from the beta. This one is from 4.10.
There is a similar error with GetErrorDescription() using the same Tailbite procedure.
Code: Select all
Procedure ErrorHandler()
string.s+TBTest(GetErrorDescription())+#CRLF$
string.s+"something"
MessageRequester("Error",string.s)
EndProcedure
Posted: Sun Apr 13, 2008 12:37 pm
by ABBKlaus
It´s string related and exists since PB4.00 !
I just tested it out with this snipped :
Compile with TailBite [Srod_String_Bug_1.pb]
Code: Select all
ProcedureDLL.s HeyHo(a.s)
a$="1"
ProcedureReturn a$
EndProcedure
Test-Prog [Srod_String_Bug_2.pb]
Code: Select all
Procedure TEST_PROC()
Debug HeyHo(LCase("a100"))
EndProcedure
TEST_PROC()
it always debugs
a100
instead of
1
Posted: Wed Apr 16, 2008 9:19 am
by Mistrel
How should this bug be reported? It is a Tailbite bug? I cannot reproduce it in only PureBasic to submit a normal report.
Posted: Wed Apr 16, 2008 11:09 am
by srod