Terminate standalone bracketed symbol strings

Standalone bracketed symbols like the following weren't being zero-terminated.

X EQUS {Y}

This doesn't apply to bracketed symbols that aren't standalone, but are
instead found in a string. For example, the following works even without this
fix.

X EQUS "{Y}"
This commit is contained in:
dbrotz
2019-06-26 17:45:49 -07:00
parent 3cd1d46a1b
commit b3120aea25

View File

@@ -731,7 +731,9 @@ scanagain:
return T_STRING;
} else if (*pLexBuffer == '{') {
pLexBuffer++;
yylex_ReadBracketedSymbol(yylval.tzString, 0);
size_t len = yylex_ReadBracketedSymbol(yylval.tzString,
0);
yylval.tzString[len] = 0;
return T_STRING;
}