From 7c523338c512eee9d0c039bb90edbe64bd3d139e Mon Sep 17 00:00:00 2001 From: Perry Kundert Date: Wed, 4 Oct 2017 08:33:35 -0700 Subject: [PATCH] Remove unnnecessary NUL termination of yytext (as it may contain NULs) --- src/json.hpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 516f2bbb..1231354c 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -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;