all repos — mgba @ c6a8cdbe73614d3e34edf7cb143f3ed56cbe1b5f

mGBA Game Boy Advance Emulator

GB: Fix uninitialized sramBank variable
Jeffrey Pfau jeffrey@endrift.com
Tue, 26 Jan 2016 02:41:39 -0800
commit

c6a8cdbe73614d3e34edf7cb143f3ed56cbe1b5f

parent

d13e186f9177519a261b7a74c9a3520607a91f55

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

jump to
M src/gb/memory.csrc/gb/memory.c

@@ -73,6 +73,7 @@ gb->memory.wramBank = &gb->memory.wram[GB_SIZE_WORKING_RAM_BANK0];

gb->memory.romBank = &gb->memory.rom[GB_SIZE_CART_BANK0]; gb->memory.currentBank = 1; gb->memory.sramCurrentBank = 0; + gb->memory.sramBank = gb->memory.sram; memset(&gb->video.oam, 0, sizeof(gb->video.oam));