Skip to content

Commit

Permalink
Merge pull request #99259 from Macksaur/fix_tilemap_compat
Browse files Browse the repository at this point in the history
Fix setting TileMap data compatibility format broken by #98898.
  • Loading branch information
akien-mga authored Nov 15, 2024
2 parents 673f396 + 282425e commit 98ddec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/2d/tile_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 98ddec4

Please sign in to comment.