mirror of
https://github.com/nothings/stb
synced 2024-12-14 20:12:34 +03:00
fix bug in integer parsing
This commit is contained in:
parent
3f73dfd7ce
commit
31eff2dcaf
@ -634,7 +634,7 @@ int stb_c_lexer_get_token(stb_lexer *lexer)
|
||||
if (p[1] == 'x' || p[1] == 'X') {
|
||||
char *q = p+2;
|
||||
#ifdef STB__CLEX_use_stdlib
|
||||
lexer->int_number = strtol((char *) p, (char **) q, 16);
|
||||
lexer->int_number = strtol((char *) p, (char **) &q, 16);
|
||||
#else
|
||||
stb__clex_int n=0;
|
||||
while (q != lexer->eof) {
|
||||
|
Loading…
Reference in New Issue
Block a user