diff --git a/CHANGES b/CHANGES index b23323b82..b7c9d25ff 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,7 @@ Bugfixes: - GBA Cheats: Fix GameShark ROM patches - Qt: Fix cut off tiles and alignment issues in tile viewer - GB MBC: Fix initializing MBC when no ROM is loaded + - VFS: Fix resizing memory chunks when not needed Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers diff --git a/src/util/vfs/vfs-mem.c b/src/util/vfs/vfs-mem.c index 174ef6587..2d8798012 100644 --- a/src/util/vfs/vfs-mem.c +++ b/src/util/vfs/vfs-mem.c @@ -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) { struct VFileMem* vfm = (struct VFileMem*) vf; - if (size + vfm->offset >= vfm->size) { + if (size + vfm->offset > vfm->size) { _vfmExpand(vfm, vfm->offset + size); }