04d22f66
by Francis De Brabandere at 2026-05-15T21:43:28+02:00
vbscript: Treat non-literal BSTR as greater than non-literal numeric/bool.
Native VBScript's BSTR-vs-numeric/bool comparison has three paths depending
on compile-time literal status of each side:
- numeric/bool side is a bare literal: coerce BSTR to a number (error 13
on parse failure) — already handled.
- BSTR side is a bare literal, numeric/bool is not: convert numeric to its
CStr form and string-compare — was previously taken unconditionally.
- neither side is a literal: return BSTR > numeric/bool regardless of
values — previously fell into the string-compare path, so matching
stringifications like "5" = CInt(5) compared equal instead of unequal.
Extend is_literal_expr to also flag EXPR_STRING so the BSTR-literal case is
distinguishable from the variable case, and add the third path.