mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
vbscript: Added support for hex literals not ending with '&'.
This commit is contained in:
parent
b5a031d804
commit
76eeca2255
2 changed files with 6 additions and 2 deletions
|
@ -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""")
|
||||
|
|
Loading…
Reference in a new issue