From 9d08997fdcccf8fd5c0909e2ae8f8902c7db436c Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 13 Oct 2013 03:25:46 -0700 Subject: [PATCH] Fix Huffman with tree sizes >127 --- src/gba/gba-bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/gba-bios.c b/src/gba/gba-bios.c index 2b18a77ba..55eedd2a7 100644 --- a/src/gba/gba-bios.c +++ b/src/gba/gba-bios.c @@ -357,7 +357,7 @@ static void _unHuffman(struct GBAMemory* memory, uint32_t source, uint32_t* dest remaining &= 0xFFFFFFFC; // We assume the signature byte (0x20) is correct //var tree = []; - int treesize = (memory->d.load8(&memory->d, source + 4, 0) << 1) + 1; + int treesize = (memory->d.loadU8(&memory->d, source + 4, 0) << 1) + 1; int block = 0; uint32_t treeBase = source + 5; uint32_t sPointer = source + 5 + treesize;