mirror of
https://github.com/nlohmann/json.git
synced 2025-08-06 04:46:35 +08:00
Remove unnnecessary NUL termination of yytext (as it may contain NULs)
This commit is contained in:
parent
14ca1f6f09
commit
7c523338c5
@ -1828,9 +1828,6 @@ class lexer
|
||||
// closing quote
|
||||
case '\"':
|
||||
{
|
||||
// terminate yytext
|
||||
add('\0');
|
||||
--yylen;
|
||||
return token_type::value_string;
|
||||
}
|
||||
|
||||
@ -2576,10 +2573,6 @@ scan_number_done:
|
||||
// we are done scanning a number)
|
||||
unget();
|
||||
|
||||
// terminate token
|
||||
add('\0');
|
||||
--yylen;
|
||||
|
||||
char* endptr = nullptr;
|
||||
errno = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user