ref: 37b615f070a2859b71e1a6a4f12a398c9a6dd467
parent: 6438ae2591701f598a343dbe8b6bc0570d1ee716
author: YamaArashi <[email protected]>
date: Sat Jul 25 17:20:44 EDT 2015
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.
--- a/src/asm/globlex.c
+++ b/src/asm/globlex.c
@@ -161,7 +161,7 @@
if (*src == '@')
marg = sym_FindMacroArg(-1);
else if (*src >= '0' && *src <= '9')
- marg = sym_FindMacroArg(*src);
+ marg = sym_FindMacroArg(*src - '0');
else {
fatalerror("Malformed ID");
return (0);