diff --git a/assembler/assembler.c b/assembler/assembler.c index 121ce32..6647ab7 100644 --- a/assembler/assembler.c +++ b/assembler/assembler.c @@ -172,6 +172,9 @@ int try_expand_macro(struct assembler_state *state, char **line) { if (strstr(*line, "macro") == *line + 1) { // Cannot expand macros while defining them return 0; } + if (strstr(*line, "undefine") == *line + 1) { // Should not expand while removing + return 0; + } if (strstr(*line, "ifdef") == *line + 1) { // Should not expand when testing for existence return 0; } diff --git a/assembler/directives.c b/assembler/directives.c index f68f14a..eeb7875 100644 --- a/assembler/directives.c +++ b/assembler/directives.c @@ -433,6 +433,8 @@ int handle_undef(struct assembler_state *state, char **argv, int argc) { return 1; } + scas_log(L_DEBUG, "Looking for %s", argv[0]); + int i; for (i = 0; i < state->macros->length; i++) { macro_t *m = state->macros->items[i];