mirror of https://github.com/mgba-emu/mgba.git
GBA BIOS: Fix incorrect exit condition in LZ77
This commit is contained in:
parent
212d4f5cf3
commit
e0ee881e5f
1
CHANGES
1
CHANGES
|
@ -11,6 +11,7 @@ Bugfixes:
|
||||||
- Qt: Fix locale being set to English on settings save (fixes mgba.io/i/906)
|
- Qt: Fix locale being set to English on settings save (fixes mgba.io/i/906)
|
||||||
- LR35902: Fix watchpoints not reporting new value
|
- LR35902: Fix watchpoints not reporting new value
|
||||||
- GBA Audio: Increase PSG volume (fixes mgba.io/i/932)
|
- GBA Audio: Increase PSG volume (fixes mgba.io/i/932)
|
||||||
|
- GBA BIOS: Fix incorrect exit condition in LZ77
|
||||||
Misc:
|
Misc:
|
||||||
- GBA: Improve multiboot image detection
|
- GBA: Improve multiboot image detection
|
||||||
- GB MBC: Remove erroneous bank 0 wrapping
|
- GB MBC: Remove erroneous bank 0 wrapping
|
||||||
|
|
|
@ -529,8 +529,10 @@ static void _unLz77(struct GBA* gba, int width) {
|
||||||
source += 2;
|
source += 2;
|
||||||
disp = dest - (block & 0x0FFF) - 1;
|
disp = dest - (block & 0x0FFF) - 1;
|
||||||
bytes = (block >> 12) + 3;
|
bytes = (block >> 12) + 3;
|
||||||
while (bytes-- && remaining) {
|
while (bytes--) {
|
||||||
|
if (remaining) {
|
||||||
--remaining;
|
--remaining;
|
||||||
|
}
|
||||||
if (width == 2) {
|
if (width == 2) {
|
||||||
byte = (int16_t) cpu->memory.load16(cpu, disp & ~1, 0);
|
byte = (int16_t) cpu->memory.load16(cpu, disp & ~1, 0);
|
||||||
if (dest & 1) {
|
if (dest & 1) {
|
||||||
|
|
Loading…
Reference in New Issue