uxn

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

commit 0da8709ce361cc24ab47f44c2c5b4a742f3063ae
parent ca5ad113eedf238e0534de21a4e2d3fd43d96de2
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun, 29 Aug 2021 10:51:14 -0700

Assembly stop on long token

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

diff --git a/src/uxnasm.c b/src/uxnasm.c @@ -162,8 +162,6 @@ makemacro(char *name, FILE *f) if(word[0] == '}') break; if(m->len > 64) return error("Macro too large", name); - if(slen(word) >= 63) - return error("Word too long", name); scpy(word, m->items[m->len++], 64); } return 1; @@ -306,8 +304,8 @@ pass1(FILE *f) char w[64], scope[64], subw[64]; while(fscanf(f, "%63s", w) == 1) { if(skipblock(w, &ccmnt, '(', ')')) continue; - if(slen(w) == 63) - fprintf(stderr, "Warning: token beginning with \"%s\" is too long\n", w); + if(slen(w) >= 63) + return error("Pass 1 - Invalid token", w); if(w[0] == '|') { if(!sihx(w + 1)) return error("Pass 1 - Invalid padding", w);