From 1f9fd0f060801ac351007f4ce8064420a63dfaea Mon Sep 17 00:00:00 2001 From: stag019 Date: Sun, 22 Dec 2013 20:56:31 -0500 Subject: [PATCH] This fixes an error with using long label names in macros. If the label name you're using is longer than the string length of the literal macro text, a syntax error would occur. This fix makes sure it at least allocates enough bytes for the largest allowed label name. --- src/asm/fstack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asm/fstack.c b/src/asm/fstack.c index b7c3d489..87a0b7b5 100644 --- a/src/asm/fstack.c +++ b/src/asm/fstack.c @@ -275,7 +275,7 @@ fstk_RunMacro(char *s) pCurrentMacro = sym; CurrentFlexHandle = yy_scan_bytes(pCurrentMacro->pMacro, - pCurrentMacro->ulMacroSize); + (pCurrentMacro->ulMacroSize < MAXSYMLEN ? MAXSYMLEN : pCurrentMacro->ulMacroSize)); //Dirty hack to fix small macros using long label names. yy_switch_to_buffer(CurrentFlexHandle); return (1); } else