Merge branch 'patch-1' of https://github.com/mundusnine/stb into working

This commit is contained in:
Sean Barrett 2021-07-03 10:39:01 -07:00
commit 177b6c6d9d

View File

@ -37,6 +37,7 @@
// Contributors:
// Arpad Goretity (bugfix)
// Alan Hickman (hex floats)
// github:mundusnine (bugfix)
//
// LICENSE
//
@ -588,7 +589,6 @@ int stb_c_lexer_get_token(stb_lexer *lexer)
{
int n = 0;
lexer->string = lexer->string_storage;
lexer->string_len = n;
do {
if (n+1 >= lexer->string_storage_len)
return stb__clex_token(lexer, CLEX_parse_error, p, p+n);
@ -602,6 +602,7 @@ int stb_c_lexer_get_token(stb_lexer *lexer)
STB_C_LEX_DOLLAR_IDENTIFIER( || p[n] == '$' )
);
lexer->string[n] = 0;
lexer->string_len = n;
return stb__clex_token(lexer, CLEX_id, p, p+n-1);
}