uxn

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

commit 4988b2214edd2b06135ddc8649d6a46507264235
parent 428a1da50e004fcab51e452303f5a8fe58b5979b
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Mon,  8 Nov 2021 18:51:14 +0100

uxnasm: reset scope to avoid pointing at garbage

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

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