From 282425eefb9e97ab31ff0f25f3b135ed2e2aca42 Mon Sep 17 00:00:00 2001 From: Mack <86566939+Macksaur@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:20:30 +0000 Subject: [PATCH] Fix setting TileMap data compatibility format broken by #98898. --- scene/2d/tile_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 20cbbc091a4..8e9500cdbe1 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -75,7 +75,7 @@ void TileMap::_set_tile_map_data_using_compatibility_format(int p_layer, TileMap for (int i = 0; i < c; i += offset) { const uint8_t *ptr = (const uint8_t *)&r[i]; uint8_t local[12]; - const int buffer_size = (format == TILE_MAP_DATA_FORMAT_2) ? 12 : 8; + const int buffer_size = (p_format >= TILE_MAP_DATA_FORMAT_2) ? 12 : 8; for (int j = 0; j < buffer_size; j++) { local[j] = ptr[j]; }