commit 5571e0a
Devine Lu Linvega
·
2024-07-01 04:59:18 +0000 UTC
parent f8ec872
Do not pass memory to console deo
4 files changed,
+5,
-4
+2,
-1
1@@ -215,9 +215,10 @@ console_dei(Uint8 addr)
2 }
3
4 void
5-console_deo(Uint8 *d, Uint8 port)
6+console_deo(Uint8 port)
7 {
8 FILE *fd = NULL;
9+ Uint8 *d = &uxn.dev[0x10];
10 switch(port) {
11 case 0x5: /* Console/dead */ start_fork(d); break;
12 case 0x6: /* Console/exit*/ kill_child(d, 0); break;
+1,
-1
1@@ -17,4 +17,4 @@ WITH REGARD TO THIS SOFTWARE.
2 int console_input(char c, int type);
3 void console_listen(int i, int argc, char **argv);
4 Uint8 console_dei(Uint8 addr);
5-void console_deo(Uint8 *d, Uint8 port);
6+void console_deo(Uint8 port);
+1,
-1
1@@ -67,7 +67,7 @@ emu_deo(Uint8 addr, Uint8 value)
2 if(p > 0x7 && p < 0xe)
3 screen_palette(&uxn.dev[0x8]);
4 break;
5- case 0x10: console_deo(&uxn.dev[d], p); break;
6+ case 0x10: console_deo(p); break;
7 case 0x20: screen_deo(p); break;
8 case 0xa0: file_deo(0, &uxn.dev[d], p); break;
9 case 0xb0: file_deo(1, &uxn.dev[d], p); break;
+1,
-1
1@@ -38,7 +38,7 @@ emu_deo(Uint8 addr, Uint8 value)
2 uxn.dev[addr] = value;
3 switch(d) {
4 case 0x00: system_deo(p); break;
5- case 0x10: console_deo(&uxn.dev[d], p); break;
6+ case 0x10: console_deo(p); break;
7 case 0xa0: file_deo(0, &uxn.dev[d], p); break;
8 case 0xb0: file_deo(1, &uxn.dev[d], p); break;
9 }