shithub: rgbds

Download patch

ref: 40405555325197b9b62a825bd55bdfdd8215812c
parent: defb221c9834a15da53fc9b1023f9c55e2637f12
parent: b3120aea25b78ebb2e025f8a4ffebbebf473a251
author: Antonio Niño Díaz <[email protected]>
date: Sun Jul 7 07:46:43 EDT 2019

Merge pull request #365 from dbrotz/terminate-bracketed-symbol

Terminate standalone bracketed symbol strings

--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -778,7 +778,9 @@
 			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;
 		}