May 18, 2026
1:20 p.m.
Jacek Caban (@jacek) commented about dlls/vbscript/lex.c:
+static int oct_to_int(WCHAR c) +{ + if('0' <= c && c <= '7') + return c-'0'; + return -1; +} + +static int parse_oct_literal(parser_ctx_t *ctx, LONG *ret) +{ + ULONGLONG l = 0; + int d; + + /* Skip leading zeros — Windows allows any number of them. */ + while(ctx->ptr[1] == '0') + ctx->ptr++;
I guess that's based on `parse_hex_literal`, but it's used for overflow check there. The way you check it here, you don't need that special case. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10900#note_140365