all repos — mgba @ 75865cab949de2026f6bb6cbdd3271a7e5b036d7

mGBA Game Boy Advance Emulator

Core: Fix reported ROM size when a fixed buffer size is used
Vicki Pfau vi@endrift.com
Mon, 10 Aug 2020 00:09:02 -0700
commit

75865cab949de2026f6bb6cbdd3271a7e5b036d7

parent

da6a0254ab638c4f8a29e8c9b5030b626cb57065

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

jump to
M CHANGESCHANGES

@@ -1,7 +1,10 @@

0.8.4: (Future) +Emulation fixes: + - GBA Video: Invalidate map cache when modifying BGCNT (fixes mgba.io/i/1846) +Other fixes: - 3DS: Redo video sync to be more precise - 3DS: Fix crash with libctru 2.0 when exiting - - GBA Video: Invalidate map cache when modifying BGCNT (fixes mgba.io/i/1846) + - Core: Fix reported ROM size when a fixed buffer size is used - Qt: Add dummy English translation file (fixes mgba.io/i/1469) - mGUI: Fix closing down a game if an exit is signalled - mVL: Fix injecting accidentally draining non-injection buffer
M src/core/core.csrc/core/core.c

@@ -145,7 +145,10 @@

#ifdef FIXED_ROM_BUFFER extern uint32_t* romBuffer; extern size_t romBufferSize; - vfm = VFileFromMemory(romBuffer, romBufferSize); + if (size > romBufferSize) { + size = romBufferSize; + } + vfm = VFileFromMemory(romBuffer, size); #else vfm = VFileMemChunk(NULL, size); #endif