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.

This commit is contained in:
stag019
2013-12-22 20:56:31 -05:00
parent 1218da79a9
commit 1f9fd0f060

View File

@@ -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