From 03c2eb077618ddae1e81e4a23f96f84551f10dcd Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 24 Apr 2015 00:13:50 -0700 Subject: [PATCH] GBA: A bit less confusing addressing into the middle of a struct --- src/gba/sharkport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gba/sharkport.c b/src/gba/sharkport.c index 3c9707abc..88f21f721 100644 --- a/src/gba/sharkport.c +++ b/src/gba/sharkport.c @@ -77,7 +77,7 @@ bool GBASavedataImportSharkPort(struct GBA* gba, struct VFile* vf, bool testChec } 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 @@ bool GBASavedataExportSharkPort(const struct GBA* gba, struct VFile* vf) { } 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;