mirror of https://github.com/mgba-emu/mgba.git
Core: Fix ELF loading regression (fixes #1669)
This commit is contained in:
parent
f1d5e39f88
commit
5f3dc723f6
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
|||
0.8.2: (Future)
|
||||
Other fixes:
|
||||
- Core: Fix ELF loading regression (fixes mgba.io/i/1669)
|
||||
|
||||
0.8.1: (2020-02-16)
|
||||
Emulation fixes:
|
||||
- GB Serialize: Fix timing bug loading channel 4 timing
|
||||
|
|
|
@ -370,7 +370,7 @@ bool mCoreLoadELF(struct mCore* core, struct ELF* elf) {
|
|||
Elf32_Phdr* phdr = ELFProgramHeadersGetPointer(&ph, i);
|
||||
void* block = mCoreGetMemoryBlock(core, phdr->p_paddr, &bsize);
|
||||
char* bytes = ELFBytes(elf, &esize);
|
||||
if (block && bsize >= phdr->p_filesz && bsize > phdr->p_offset && esize >= phdr->p_filesz + phdr->p_offset) {
|
||||
if (block && bsize >= phdr->p_filesz && esize > phdr->p_offset && esize >= phdr->p_filesz + phdr->p_offset) {
|
||||
memcpy(block, &bytes[phdr->p_offset], phdr->p_filesz);
|
||||
} else {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue