http://bugs.winehq.org/show_bug.cgi?id=5469
Summary: VB6.0 string compare gives wrong result Product: Wine Version: 0.9.12. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-binary AssignedTo: wine-bugs@winehq.org ReportedBy: charles@diagnos.co.uk
Running a test program with the following code in it (compiled using Visual Basic 6.0) gives different results on Windows XP and on Wine 0.9.12 running on Debian (unstable):
a$ = Chr$(1) + Chr$(2) + Chr$(0) + Chr$(3) If a$ = Chr$(1) + Chr$(2) + Chr$(0) + Chr$(4) Then MsgBox ("WOW1")
Under Windows XP, the correct result is given (ie no msgbox). Under Wine, the msgbox pops up.
The program gets the correct length of the string (ie 4), and can read the correct characters off, but thinks that the two strings match when compared.
It only has this problem when the chr$(0) is in the string. Does the string compare function see the chr$(0) and think it's a null-terminated string?