[Git][wine/wine][master] 2 commits: vbscript/tests: Cover non-literal numeric vs whitespace-only and control-char BSTR.
Alexandre Julliard pushed to branch master at wine / wine Commits: 0bdfd1ab by Francis De Brabandere at 2026-05-05T11:02:21-04:00 vbscript/tests: Cover non-literal numeric vs whitespace-only and control-char BSTR. Native VBScript treats a BSTR as larger than any numeric in BSTR-vs-numeric comparison, regardless of binary lex order, when the BSTR is non-empty and either all-whitespace (e.g. Space(N)) or contains any C0 control character (Chr(0)..Chr(31)). Wine's CStr- coerce path goes through VarCmp's binary order and gets the opposite result for single-digit numerics, breaking the practical Left(str, n) guard pattern Len(str) > Space(n). - - - - - dcf72e3a by Francis De Brabandere at 2026-05-05T11:02:23-04:00 vbscript: Treat all-whitespace and control-char BSTR as greater than numeric. Native VBScript sorts a non-empty BSTR higher than any numeric or boolean operand, regardless of the binary lex order their CStr forms would produce, when the BSTR is either all-whitespace (Space, tab, LF, CR, NBSP, ...) or contains any C0 control character (Chr(0).. Chr(31)). Add an early-out in var_cmp before the CStr-coerce path. BSTRs are length-prefixed and may contain embedded NUL, so the scan walks SysStringLen characters rather than stopping at NUL. - - - - - 2 changed files: - dlls/vbscript/interp.c - dlls/vbscript/tests/lang.vbs View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/3dd198144ec9f91687f70433e85c5d... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/3dd198144ec9f91687f70433e85c5d... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)