ref: 361f1ac50b0239694b59fb79678a8fbb4ac962de
parent: 4f8cf84ed4f59e4c7fb751cb940eb9a1f4c2a691
author: Anthony J. Bentley <[email protected]>
date: Thu Jan 22 16:12:57 EST 2015
Work around a crash when '@' is interpreted as a macro name.
--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -540,7 +540,7 @@
yy_set_state(LEX_STATE_NORMAL);
if (!fstk_RunMacro($1)) {
- yyerror("Macro '%s' not defined", $1);
+ fatalerror("Macro '%s' not defined", $1);
}
};
--- a/src/asm/fstack.c
+++ b/src/asm/fstack.c
@@ -255,6 +255,8 @@
sym_UseNewMacroArgs();
nCurrentStatus = STAT_isMacro;
strcpy(tzCurrentFileName, s);
+ if (sym->pMacro == NULL)
+ return 0;
pCurrentMacro = sym;
CurrentFlexHandle =
yy_scan_bytes(pCurrentMacro->pMacro,