game: fix theoretical loop bug

This commit is contained in:
Crypto City 2019-12-08 14:49:23 +00:00
parent d9a5afb18b
commit b52d1cd974

View File

@ -164,8 +164,8 @@ std::vector<std::vector<uint8_t>> Flag::get_tiles() const
for (uint32_t x = x0; x <= x1; ++x)
{
old_tiles.push_back({});
uint16_t th = get_tile_height(x, y);
for (uint16_t h = 0; h < th; ++h)
uint32_t th = get_tile_height(x, y);
for (uint32_t h = 0; h < th; ++h)
old_tiles.back().push_back(get_tile_type(x, y, h));
}
}