Commit 76eeca22 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Added support for hex literals not ending with '&'.

parent b5a031d8
......@@ -294,12 +294,14 @@ static int parse_hex_literal(parser_ctx_t *ctx, LONG *ret)
while((d = hex_to_int(*++ctx->ptr)) != -1)
l = l*16 + d;
if(begin + 9 /* max digits+1 */ < ctx->ptr || *ctx->ptr != '&') {
if(begin + 9 /* max digits+1 */ < ctx->ptr || (*ctx->ptr != '&' && is_identifier_char(*ctx->ptr))) {
FIXME("invalid literal\n");
return 0;
}
ctx->ptr++;
if(*ctx->ptr == '&')
ctx->ptr++;
*ret = l;
return (short)l == l ? tShort : tLong;
}
......
......@@ -43,6 +43,8 @@ Call ok(--1 = 1, "--1 = " & --1)
Call ok(-empty = 0, "-empty = " & (-empty))
Call ok(true = -1, "! true = -1")
Call ok(false = 0, "false <> 0")
Call ok(&hff = 255, "&hff <> 255")
Call ok(&Hff = 255, "&Hff <> 255")
x = "xx"
Call ok(x = "xx", "x = " & x & " expected ""xx""")
......
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