Commit b2cbc264 authored by Jason Millard's avatar Jason Millard Committed by Alexandre Julliard

vbscript: Fix compile issue with non hex after concat without space.

(cherry picked from commit e8bd0665)
parent 270c09ee
...@@ -473,7 +473,7 @@ static int parse_next_token(void *lval, unsigned *loc, parser_ctx_t *ctx) ...@@ -473,7 +473,7 @@ static int parse_next_token(void *lval, unsigned *loc, parser_ctx_t *ctx)
case '#': case '#':
return parse_date_literal(ctx, lval); return parse_date_literal(ctx, lval);
case '&': 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 parse_hex_literal(ctx, lval);
return '&'; return '&';
case '=': case '=':
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
OPTION EXPLICIT : : DIM W OPTION EXPLICIT : : DIM W
dim x, y, z, e dim x, y, z, e, hi
Dim obj Dim obj
call ok(true, "true is not true?") call ok(true, "true is not true?")
...@@ -62,6 +62,11 @@ Call ok(&hfffe& = 65534, "&hfffe& <> -2") ...@@ -62,6 +62,11 @@ Call ok(&hfffe& = 65534, "&hfffe& <> -2")
Call ok(&hffffffff& = -1, "&hffffffff& <> -1") Call ok(&hffffffff& = -1, "&hffffffff& <> -1")
Call ok((&h01or&h02)=3,"&h01or&h02 <> 3") 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 W = 5
Call ok(W = 5, "W = " & W & " expected " & 5) Call ok(W = 5, "W = " & W & " expected " & 5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment