all repos — mgba @ d5da0ff31b21574291b3fcf716d3015e96e5cfda

mGBA Game Boy Advance Emulator

GBA: Fix type-punning warning
Jeffrey Pfau jeffrey@endrift.com
Sun, 20 Dec 2015 19:57:45 -0800
commit

d5da0ff31b21574291b3fcf716d3015e96e5cfda

parent

6b2eaed35ace3f2a71990fb90b2b22ff97c371e2

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

jump to
M src/gba/gba.csrc/gba/gba.c

@@ -734,12 +734,12 @@ }

if (vf->seek(vf, GBA_MB_MAGIC_OFFSET, SEEK_SET) < 0) { return false; } - uint8_t signature[sizeof(uint32_t)]; + uint32_t signature; if (vf->read(vf, &signature, sizeof(signature)) != sizeof(signature)) { return false; } uint32_t opcode; - LOAD_32(opcode, 0, signature); + LOAD_32(opcode, 0, &signature); struct ARMInstructionInfo info; ARMDecodeARM(opcode, &info); if (info.branchType != ARM_BRANCH) {