Make sure gfx_update_loaded_texture() stays in bounds

This commit is contained in:
MysterD 2023-04-26 16:19:53 -07:00
parent 2ebe4fe392
commit 484616d07b
1 changed files with 1 additions and 0 deletions

View File

@ -197,6 +197,7 @@ static const uint8_t missing_texture[MISSING_W * MISSING_H * 4] = {
static bool sOnlyTextureChangeOnAddrChange = false;
static void gfx_update_loaded_texture(uint8_t tile_number, uint32_t size_bytes, const uint8_t* addr) {
if (tile_number > 1) { return; }
if (!sOnlyTextureChangeOnAddrChange) {
rdp.textures_changed[tile_number] = true;
} else if (!rdp.textures_changed[tile_number]) {