commit 3b40bc1

Devine Lu Linvega  ·  2025-04-19 16:54:37 +0000 UTC
parent 7fd4d2f
Cleanup
1 files changed,  +10, -10
+10, -10
 1@@ -80,7 +80,7 @@ static Uxn uxn;
 2 int
 3 uxn_eval(Uint16 pc)
 4 {
 5-	unsigned int a, b, c, x[2], y[2], z[2], step;
 6+	Uint32 a, b, c, x[2], y[2], z[2], step;
 7 	if(!pc || uxn.dev[0x0f]) return 0;
 8 	for(step = STEP_MAX; step; step--) {
 9 		switch(uxn.ram[pc++]) {
10@@ -189,20 +189,20 @@ system_deo(Uint8 port)
11 		Uint8 *aptr = uxn.ram + addr;
12 		Uint16 length = PEEK2(aptr + 1);
13 		if(uxn.ram[addr] == 0x0) {
14-			unsigned int a = PEEK2(aptr + 3) * 0x10000 + PEEK2(aptr + 5);
15-			unsigned int b = a + length;
16+			Uint32 a = PEEK2(aptr + 3) * 0x10000 + PEEK2(aptr + 5);
17+			Uint32 b = a + length;
18 			value = uxn.ram[addr + 7];
19 			for(; a < b; uxn.ram[a++] = value);
20 		} else if(uxn.ram[addr] == 0x1) {
21-			unsigned int a = PEEK2(aptr + 3) * 0x10000 + PEEK2(aptr + 5);
22-			unsigned int b = a + length;
23-			unsigned int c = PEEK2(aptr + 7) * 0x10000 + PEEK2(aptr + 9);
24+			Uint32 a = PEEK2(aptr + 3) * 0x10000 + PEEK2(aptr + 5);
25+			Uint32 b = a + length;
26+			Uint32 c = PEEK2(aptr + 7) * 0x10000 + PEEK2(aptr + 9);
27 			for(; a < b; uxn.ram[c++] = uxn.ram[a++]);
28 		} else if(uxn.ram[addr] == 0x2) {
29-			unsigned int a = PEEK2(aptr + 3) * 0x10000 + PEEK2(aptr + 5);
30-			unsigned int b = a + length;
31-			unsigned int c = PEEK2(aptr + 7) * 0x10000 + PEEK2(aptr + 9);
32-			unsigned int d = c + length;
33+			Uint32 a = PEEK2(aptr + 3) * 0x10000 + PEEK2(aptr + 5);
34+			Uint32 b = a + length;
35+			Uint32 c = PEEK2(aptr + 7) * 0x10000 + PEEK2(aptr + 9);
36+			Uint32 d = c + length;
37 			for(; b >= a; uxn.ram[--d] = uxn.ram[--b]);
38 		} else
39 			fprintf(stderr, "Unknown command: %s\n", &uxn.ram[addr]);