mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
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:
@@ -275,7 +275,7 @@ fstk_RunMacro(char *s)
|
|||||||
pCurrentMacro = sym;
|
pCurrentMacro = sym;
|
||||||
CurrentFlexHandle =
|
CurrentFlexHandle =
|
||||||
yy_scan_bytes(pCurrentMacro->pMacro,
|
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);
|
yy_switch_to_buffer(CurrentFlexHandle);
|
||||||
return (1);
|
return (1);
|
||||||
} else
|
} else
|
||||||
|
|||||||
Reference in New Issue
Block a user