uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 751d1986068ce91998e881d7d0e6e11196f86a06
parent cdfcb5ae0ab9ef02ddff788cec30bb271c1bd1b4
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Tue, 20 Apr 2021 23:05:27 +0100

Fixed file memory location

Diffstat:
Msrc/emulator.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/emulator.c b/src/emulator.c @@ -233,7 +233,7 @@ file_poke(Uxn *u, Uint8 *m, Uint8 b0, Uint8 b1) Uint16 addr = (m[b0 - 1] << 8) | b1; FILE *f = fopen(name, read ? "r" : (offset ? "a" : "w")); if(f) { - if(fseek(f, offset, SEEK_SET) != -1 && (result = read ? fread(&m[addr], 1, length, f) : fwrite(&m[addr], 1, length, f))) + if(fseek(f, offset, SEEK_SET) != -1 && (result = read ? fread(&u->ram.dat[addr], 1, length, f) : fwrite(&u->ram.dat[addr], 1, length, f))) printf("%s %d bytes, at %04x from %s\n", read ? "Loaded" : "Saved", length, addr, name); fclose(f); }