Browse code

(uxnasm) Fixed refs limit check

Devine Lu Linvega authored on 01/03/2023 19:46:44
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ typedef struct {
39 39
 	Uint16 llen, mlen, rlen;
40 40
 	Label labels[0x400];
41 41
 	Macro macros[0x100];
42
-	Reference refs[0x400];
42
+	Reference refs[0x800];
43 43
 	char scope[0x40];
44 44
 } Program;
45 45
 
... ...
@@ -179,7 +179,7 @@ makereference(char *scope, char *label, char rune, Uint16 addr)
179 179
 {
180 180
 	char subw[0x40], parent[0x40];
181 181
 	Reference *r;
182
-	if(p.rlen == 0x1000)
182
+	if(p.rlen >= 0x800)
183 183
 		return error("References limit exceeded", label);
184 184
 	r = &p.refs[p.rlen++];
185 185
 	if(label[0] == '&') {