diff options
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -359,12 +359,12 @@ static int readhexaesc (LexState *ls) { | |||
359 | ** for error reporting in case of errors; 'i' counts the number of | 359 | ** for error reporting in case of errors; 'i' counts the number of |
360 | ** saved characters, so that they can be removed if case of success. | 360 | ** saved characters, so that they can be removed if case of success. |
361 | */ | 361 | */ |
362 | static unsigned long readutf8esc (LexState *ls) { | 362 | static l_uint32 readutf8esc (LexState *ls) { |
363 | unsigned long r; | 363 | l_uint32 r; |
364 | int i = 4; /* number of chars to be removed: start with #"\u{X" */ | 364 | int i = 4; /* number of chars to be removed: start with #"\u{X" */ |
365 | save_and_next(ls); /* skip 'u' */ | 365 | save_and_next(ls); /* skip 'u' */ |
366 | esccheck(ls, ls->current == '{', "missing '{'"); | 366 | esccheck(ls, ls->current == '{', "missing '{'"); |
367 | r = cast_ulong(gethexa(ls)); /* must have at least one digit */ | 367 | r = cast_uint(gethexa(ls)); /* must have at least one digit */ |
368 | while (cast_void(save_and_next(ls)), lisxdigit(ls->current)) { | 368 | while (cast_void(save_and_next(ls)), lisxdigit(ls->current)) { |
369 | i++; | 369 | i++; |
370 | esccheck(ls, r <= (0x7FFFFFFFu >> 4), "UTF-8 value too large"); | 370 | esccheck(ls, r <= (0x7FFFFFFFu >> 4), "UTF-8 value too large"); |