all repos — mgba @ 4255d10f0864362265c8c1659c0a89fee027cf98

mGBA Game Boy Advance Emulator

Squelch compiler warning about type punning
Jeffrey Pfau jeffrey@endrift.com
Fri, 31 Jan 2014 02:29:27 -0800
commit

4255d10f0864362265c8c1659c0a89fee027cf98

parent

d6a4fbd25ae01d2982f4b2c9370c72813daa4d14

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

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

@@ -561,7 +561,8 @@

void _checkOverrides(struct GBA* gba, uint32_t id) { int i; for (i = 0; _overrides[i].id[0]; ++i) { - if (*(uint32_t*) &_overrides[i].id == id) { + const uint32_t* overrideId = (const uint32_t*) _overrides[i].id; + if (*overrideId == id) { switch (_overrides[i].type) { case SAVEDATA_FLASH512: case SAVEDATA_FLASH1M: