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