From 33d6ef8cd28c73b4f6238934979d130a5523b9c9 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 2 Feb 2023 09:35:05 -0800 Subject: [PATCH] Reversed arguments in system loader --- src/devices/system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/system.c b/src/devices/system.c index 214a1c7..78050b0 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -62,9 +62,9 @@ system_load(Uxn *u, char *filename) FILE *f = fopen(filename, "rb"); if(!f) return 0; - l = fread(&u->ram[PAGE_PROGRAM], 1, 0x10000 - PAGE_PROGRAM, f); + l = fread(&u->ram[PAGE_PROGRAM], 0x10000 - PAGE_PROGRAM, 1, f); while(l && ++i < RAM_PAGES) - l = fread(u->ram + 0x10000 * i, 1, 0x10000, f); + l = fread(u->ram + 0x10000 * i, 0x10000, 1, f); fclose(f); return 1; }