uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit bb57b85f5724ccabdb081ff83080c2e3e0e122f7
parent 3a696f8fa9931857e99e50074c6994649ee62d37
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Fri, 10 May 2024 08:15:27 -0700

Fixed issue with comments in macros, fixed by jjbliss

Diffstat:
Msrc/uxnasm.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 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;