mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Work around a crash when '@' is interpreted as a macro name.
This commit is contained in:
@@ -540,7 +540,7 @@ macro : T_ID {
|
|||||||
yy_set_state(LEX_STATE_NORMAL);
|
yy_set_state(LEX_STATE_NORMAL);
|
||||||
|
|
||||||
if (!fstk_RunMacro($1)) {
|
if (!fstk_RunMacro($1)) {
|
||||||
yyerror("Macro '%s' not defined", $1);
|
fatalerror("Macro '%s' not defined", $1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -255,6 +255,8 @@ fstk_RunMacro(char *s)
|
|||||||
sym_UseNewMacroArgs();
|
sym_UseNewMacroArgs();
|
||||||
nCurrentStatus = STAT_isMacro;
|
nCurrentStatus = STAT_isMacro;
|
||||||
strcpy(tzCurrentFileName, s);
|
strcpy(tzCurrentFileName, s);
|
||||||
|
if (sym->pMacro == NULL)
|
||||||
|
return 0;
|
||||||
pCurrentMacro = sym;
|
pCurrentMacro = sym;
|
||||||
CurrentFlexHandle =
|
CurrentFlexHandle =
|
||||||
yy_scan_bytes(pCurrentMacro->pMacro,
|
yy_scan_bytes(pCurrentMacro->pMacro,
|
||||||
|
|||||||
Reference in New Issue
Block a user