mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix bug with macro args in symbol names
If a macro arg came in the middle of a symbol or at the end, e.g. "SYM\1", it would say that the symbol was not defined. This was because it wasn't looking up the macro arg's value correctly.
This commit is contained in:
@@ -161,7 +161,7 @@ ParseSymbol(char *src, ULONG size)
|
|||||||
if (*src == '@')
|
if (*src == '@')
|
||||||
marg = sym_FindMacroArg(-1);
|
marg = sym_FindMacroArg(-1);
|
||||||
else if (*src >= '0' && *src <= '9')
|
else if (*src >= '0' && *src <= '9')
|
||||||
marg = sym_FindMacroArg(*src);
|
marg = sym_FindMacroArg(*src - '0');
|
||||||
else {
|
else {
|
||||||
fatalerror("Malformed ID");
|
fatalerror("Malformed ID");
|
||||||
return (0);
|
return (0);
|
||||||
|
|||||||
Reference in New Issue
Block a user