Browse code

Assembly stop on long token

neauoire authored on 29/08/2021 17:51:14
Showing 1 changed files
... ...
@@ -162,8 +162,6 @@ makemacro(char *name, FILE *f)
162 162
 		if(word[0] == '}') break;
163 163
 		if(m->len > 64)
164 164
 			return error("Macro too large", name);
165
-		if(slen(word) >= 63)
166
-			return error("Word too long", name);
167 165
 		scpy(word, m->items[m->len++], 64);
168 166
 	}
169 167
 	return 1;
... ...
@@ -306,8 +304,8 @@ pass1(FILE *f)
306 304
 	char w[64], scope[64], subw[64];
307 305
 	while(fscanf(f, "%63s", w) == 1) {
308 306
 		if(skipblock(w, &ccmnt, '(', ')')) continue;
309
-		if(slen(w) == 63)
310
-			fprintf(stderr, "Warning: token beginning with \"%s\" is too long\n", w);
307
+		if(slen(w) >= 63)
308
+			return error("Pass 1 - Invalid token", w);
311 309
 		if(w[0] == '|') {
312 310
 			if(!sihx(w + 1))
313 311
 				return error("Pass 1 - Invalid padding", w);