From 4f846beb26d9852c19f4e445e612ab5c6e3d0021 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 10 May 2024 08:15:53 -0700 Subject: [PATCH] Fixed issue with comments in macros, fixed by jjbliss --- src/uxnasm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uxnasm.c b/src/uxnasm.c index 762b9a9..b467b64 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -184,9 +184,9 @@ makemacro(char *name, FILE *f, Context *ctx) if(c == '%') return error_asm("Macro nested"); if(c == '{') depth++; if(c == '}' && --depth) break; - if(c == '(' && !walkcomment(f, ctx)) - return 0; - else + if(c == '(') { + if(!walkcomment(f, ctx)) return 0; + } else *dictnext++ = c; } *dictnext++ = 0; @@ -409,7 +409,7 @@ main(int argc, char *argv[]) { ptr = PAGE; copy("on-reset", scope, 0); - if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 13 Apr 2024.\n"); + if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 10 May 2024.\n"); if(argc != 3) return error_top("usage", "uxnasm [-v] input.tal output.rom"); if(!assemble(argv[1])) return 1; if(!resolve(argv[2])) return 1;