GBA BIOS: Fix BitUnPack final byte

This commit is contained in:
Vicki Pfau 2018-06-24 18:38:00 -07:00
parent 04f3fdf21e
commit 54c4da8f8a
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Bugfixes:
- PowerPC: Fix several potential crashes (fixes mgba.io/i/1089)
- Qt: Fix build with Qt 5.11 (fixes mgba.io/i/1094)
- GBA Serialize: Fix loading channel 3 volume (fixes mgba.io/i/1107)
- GBA BIOS: Fix BitUnPack final byte
0.6.3: (2017-04-14)
Bugfixes:

View File

@ -803,7 +803,7 @@ static void _unBitPack(struct GBA* gba) {
uint32_t out = 0;
int bitsRemaining = 0;
int bitsEaten = 0;
while (sourceLen > 0) {
while (sourceLen > 0 || bitsRemaining) {
if (!bitsRemaining) {
in = cpu->memory.load8(cpu, source, 0);
bitsRemaining = 8;