Merge pull request #886 from Anonym271/master

Bugfix: MemROMReaderWrite not working for size=1
This commit is contained in:
zeromus 2025-02-11 16:55:35 -05:00 committed by GitHub
commit bec2329653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ int MemROMReaderWrite(void * file, void * buffer, u32 size)
if(remain<todo)
todo = remain;
if(todo==1) *(u8*)buffer = ((u8*)mem.buf)[mem.pos];
if (todo == 1) ((u8*)mem.buf)[mem.pos] = *(u8*)buffer;
else memcpy((u8*)mem.buf + mem.pos,buffer, todo);
mem.pos += todo;
return todo;