[FIXED] Procedure returning incorrect string

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

[FIXED] Procedure returning incorrect string

Post 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
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post 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
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post 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.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I may look like a mule, but I'm not a complete ass.
Post Reply