Patch$ invalid behavior
issueid=328 27-10-2011 13:18
Super Moderator
Number of reported issues by Petr Schreiber: 131
Patch$ invalid behavior
Patch$ can trim the end of the string in unexpected way

I just found out that Patch$ can damage the string in unexpected way.

Consider this code:
String sText = "So what's going on? (sleeps) Okay, I was just sleeping a bit, sorry!"

MsgBox 0, sText
MsgBox 0, Patch$(sText, "(", ")", 1, "x")
I would expect the output to be:
"So what's going on? (x) Okay, I was just sleeping a bit, sorry!"
but it is this instead:
"So what's going on? (x) Okay, I was just sleeping a"

Petr
Issue Details
Issue Number 328
Project thinBasic
Category Core engine (thinCore.dll)
Status Fixed
Priority 3
Affected Version 1.8.9
Fixed Version 1.9.1
Milestone thinBasic 1.9.0.0
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




27-10-2011 14:17
thinBasic author
I will check this evening.
Must be something stupid I did in the code.

27-10-2011 21:52
thinBasic author
Petr fixed by himself :D
Thanks Petr.

+ Reply