Module: wine Branch: master Commit: e8bd066514fb343790b3831d3e62709f80366d61 URL: https://gitlab.winehq.org/wine/wine/-/commit/e8bd066514fb343790b3831d3e62709...
Author: Jason Millard jsm174@gmail.com Date: Wed Feb 15 16:56:28 2023 -0500
vbscript: Fix compile issue with non hex after concat without space.
---
dlls/vbscript/lex.c | 2 +- dlls/vbscript/tests/lang.vbs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c index 38ee4a5fd4b..8c5c69ea429 100644 --- a/dlls/vbscript/lex.c +++ b/dlls/vbscript/lex.c @@ -473,7 +473,7 @@ static int parse_next_token(void *lval, unsigned *loc, parser_ctx_t *ctx) case '#': return parse_date_literal(ctx, lval); case '&': - if(*++ctx->ptr == 'h' || *ctx->ptr == 'H') + if((*++ctx->ptr == 'h' || *ctx->ptr == 'H') && hex_to_int(ctx->ptr[1]) != -1) return parse_hex_literal(ctx, lval); return '&'; case '=': diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 4a629627a16..77e132133b0 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -18,7 +18,7 @@
OPTION EXPLICIT : : DIM W
-dim x, y, z, e +dim x, y, z, e, hi Dim obj
call ok(true, "true is not true?") @@ -62,6 +62,11 @@ Call ok(&hfffe& = 65534, "&hfffe& <> -2") Call ok(&hffffffff& = -1, "&hffffffff& <> -1") Call ok((&h01or&h02)=3,"&h01or&h02 <> 3")
+' Test concat when no space and var begins with h +hi = "y" +x = "x" &hi +Call ok(x = "xy", "x = " & x & " expected ""xy""") + W = 5 Call ok(W = 5, "W = " & W & " expected " & 5)