Skip to content

Commit 98ddec4

Browse files
authored
Merge pull request godotengine#99259 from Macksaur/fix_tilemap_compat
Fix setting TileMap data compatibility format broken by godotengine#98898.
2 parents 673f396 + 282425e commit 98ddec4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/2d/tile_map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void TileMap::_set_tile_map_data_using_compatibility_format(int p_layer, TileMap
7575
for (int i = 0; i < c; i += offset) {
7676
const uint8_t *ptr = (const uint8_t *)&r[i];
7777
uint8_t local[12];
78-
const int buffer_size = (format == TILE_MAP_DATA_FORMAT_2) ? 12 : 8;
78+
const int buffer_size = (p_format >= TILE_MAP_DATA_FORMAT_2) ? 12 : 8;
7979
for (int j = 0; j < buffer_size; j++) {
8080
local[j] = ptr[j];
8181
}

0 commit comments

Comments
 (0)