commit c8eaf26

Devine Lu Linvega  ·  2025-01-22 04:27:24 +0000 UTC
parent 5ffd2ca
(file.c) Removed unused check
1 files changed,  +4, -5
+4, -5
 1@@ -172,7 +172,7 @@ file_check_sandbox(UxnFile *c)
 2 }
 3 
 4 static Uint16
 5-file_init(UxnFile *c, Uint16 addr, int override_sandbox)
 6+file_init(UxnFile *c, Uint16 addr)
 7 {
 8 	size_t max_len = 0x10000 - addr;
 9 	char *filename = (char *)&uxn.ram[addr];
10@@ -182,8 +182,7 @@ file_init(UxnFile *c, Uint16 addr, int override_sandbox)
11 	if(len > max_len) len = max_len;
12 	while(len) {
13 		if((*p++ = *filename++) == '\0') {
14-			if(!override_sandbox) /* override sandbox for loading roms */
15-				file_check_sandbox(c);
16+			file_check_sandbox(c);
17 			return 0;
18 		}
19 		len--;
20@@ -333,7 +332,7 @@ file_deo(Uint8 port)
21 		POKE2(&uxn.dev[0xa2], res);
22 		break;
23 	case 0xa9:
24-		res = file_init(&uxn_file[0], PEEK2(&uxn.dev[0xa8]), 0);
25+		res = file_init(&uxn_file[0], PEEK2(&uxn.dev[0xa8]));
26 		POKE2(&uxn.dev[0xa2], res);
27 		break;
28 	case 0xab:
29@@ -357,7 +356,7 @@ file_deo(Uint8 port)
30 		POKE2(&uxn.dev[0xb2], res);
31 		break;
32 	case 0xb9:
33-		res = file_init(&uxn_file[1], PEEK2(&uxn.dev[0xb8]), 0);
34+		res = file_init(&uxn_file[1], PEEK2(&uxn.dev[0xb8]));
35 		POKE2(&uxn.dev[0xb2], res);
36 		break;
37 	case 0xbb: