VFS: Fix resizing memory chunks when not needed

This commit is contained in:
Jeffrey Pfau 2016-10-23 10:29:01 -07:00
parent 4c4fbcc2a8
commit 323d425c89
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ Bugfixes:
- GBA Cheats: Fix GameShark ROM patches - GBA Cheats: Fix GameShark ROM patches
- Qt: Fix cut off tiles and alignment issues in tile viewer - Qt: Fix cut off tiles and alignment issues in tile viewer
- GB MBC: Fix initializing MBC when no ROM is loaded - GB MBC: Fix initializing MBC when no ROM is loaded
- VFS: Fix resizing memory chunks when not needed
Misc: Misc:
- SDL: Remove scancode key input - SDL: Remove scancode key input
- GBA Video: Clean up unused timers - GBA Video: Clean up unused timers

View File

@ -238,7 +238,7 @@ ssize_t _vfmWrite(struct VFile* vf, const void* buffer, size_t size) {
ssize_t _vfmWriteExpanding(struct VFile* vf, const void* buffer, size_t size) { ssize_t _vfmWriteExpanding(struct VFile* vf, const void* buffer, size_t size) {
struct VFileMem* vfm = (struct VFileMem*) vf; struct VFileMem* vfm = (struct VFileMem*) vf;
if (size + vfm->offset >= vfm->size) { if (size + vfm->offset > vfm->size) {
_vfmExpand(vfm, vfm->offset + size); _vfmExpand(vfm, vfm->offset + size);
} }