From 4988b2214edd2b06135ddc8649d6a46507264235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Mon, 8 Nov 2021 18:51:14 +0100 Subject: [PATCH] uxnasm: reset scope to avoid pointing at garbage --- src/uxnasm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uxnasm.c b/src/uxnasm.c index ce1931c..c2185f1 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -329,6 +329,7 @@ pass1(FILE *f) { int ccmnt = 0; char w[64], scope[64], subw[64]; + scope[0] = 0; while(fscanf(f, "%63s", w) == 1) { if(skipblock(w, &ccmnt, '(', ')')) continue; if(slen(w) >= 63) @@ -364,6 +365,7 @@ pass2(FILE *f) { int ccmnt = 0, cmacr = 0; char w[64], scope[64], subw[64]; + scope[0] = 0; while(fscanf(f, "%63s", w) == 1) { if(w[0] == '%') continue; if(w[0] == '&') continue;