Free the allocated buffer before the second decompression call (hopefully helps) (#8301)
This commit is contained in:
parent
37a0ef9941
commit
aa172aad6c
@ -1575,9 +1575,9 @@ void LoadMoveBg(u16 bgId)
|
||||
void *decompressionBuffer = malloc_and_decompress(gBattleAnimBackgroundTable[bgId].tilemap, NULL);
|
||||
RelocateBattleBgPal(GetBattleBgPaletteNum(), decompressionBuffer, 0x100, FALSE);
|
||||
DmaCopy32(3, decompressionBuffer, (void *)BG_SCREEN_ADDR(26), 0x800);
|
||||
Free(decompressionBuffer);
|
||||
DecompressDataWithHeaderVram(gBattleAnimBackgroundTable[bgId].image, (void *)BG_SCREEN_ADDR(4));
|
||||
LoadPalette(gBattleAnimBackgroundTable[bgId].palette, BG_PLTT_ID(GetBattleBgPaletteNum()), PLTT_SIZE_4BPP);
|
||||
Free(decompressionBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user