GBA: A bit less confusing addressing into the middle of a struct
Jeffrey Pfau jeffrey@endrift.com
Fri, 24 Apr 2015 00:13:50 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/gba/sharkport.c
→
src/gba/sharkport.c
@@ -77,7 +77,7 @@ goto cleanup;
} struct GBACartridge* cart = (struct GBACartridge*) gba->memory.rom; - memcpy(buffer.c, cart->title, 16); + memcpy(buffer.c, &cart->title, 16); buffer.c[0x10] = 0; buffer.c[0x11] = 0; buffer.c[0x12] = cart->checksum;@@ -220,7 +220,7 @@ return false;
} size -= 0x1C; - memcpy(buffer.c, cart->title, 16); + memcpy(buffer.c, &cart->title, 16); buffer.c[0x10] = 0; buffer.c[0x11] = 0; buffer.c[0x12] = cart->checksum;