all repos — mgba @ 03c2eb077618ddae1e81e4a23f96f84551f10dcd

mGBA Game Boy Advance Emulator

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
commit

03c2eb077618ddae1e81e4a23f96f84551f10dcd

parent

d091de405744fee93eacfe55106ead3b2a03f16e

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gba/sharkport.csrc/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;