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.