mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Remove extra entry in error stack on macro not defined (#394)
While working on #392, I noticed that the macro-@ test (as well as the line-continuation test, but for that one see #393) printed an additional '@(-1)' entry which doesn't make sense.
This commit is contained in:
@@ -318,7 +318,7 @@ uint32_t fstk_RunMacro(char *s)
|
|||||||
{
|
{
|
||||||
struct sSymbol *sym = sym_FindMacro(s);
|
struct sSymbol *sym = sym_FindMacro(s);
|
||||||
|
|
||||||
if (sym == NULL)
|
if (sym == NULL || sym->pMacro == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pushcontext();
|
pushcontext();
|
||||||
@@ -328,9 +328,6 @@ uint32_t fstk_RunMacro(char *s)
|
|||||||
nCurrentStatus = STAT_isMacro;
|
nCurrentStatus = STAT_isMacro;
|
||||||
strcpy(tzCurrentFileName, s);
|
strcpy(tzCurrentFileName, s);
|
||||||
|
|
||||||
if (sym->pMacro == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
pCurrentMacro = sym;
|
pCurrentMacro = sym;
|
||||||
CurrentFlexHandle = yy_scan_bytes(pCurrentMacro->pMacro,
|
CurrentFlexHandle = yy_scan_bytes(pCurrentMacro->pMacro,
|
||||||
strlen(pCurrentMacro->pMacro));
|
strlen(pCurrentMacro->pMacro));
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
ERROR: macro-@.asm(1) -> @(-1):
|
ERROR: macro-@.asm(1):
|
||||||
Macro '@' not defined
|
Macro '@' not defined
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
ERROR: -(1) -> @(-1):
|
ERROR: -(1):
|
||||||
Macro '@' not defined
|
Macro '@' not defined
|
||||||
|
|||||||
Reference in New Issue
Block a user