From 7dc398184ff8d93309fd8cfa9a6dfbd7d5f96aac Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:43:17 +0100 Subject: [PATCH] Fix creating 105x90 rectangular no-wrap maps (#11144) --- core/src/com/unciv/logic/map/TileMap.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/map/TileMap.kt b/core/src/com/unciv/logic/map/TileMap.kt index e272763362..eeeaf0e815 100644 --- a/core/src/com/unciv/logic/map/TileMap.kt +++ b/core/src/com/unciv/logic/map/TileMap.kt @@ -465,8 +465,8 @@ class TileMap(initialCapacity: Int = 10) : IsPartOfGameInfoSerialization { } } else { // Yes the map generator calls this repeatedly, and we don't want to end up with an oversized tileMatrix - // rightX is -leftX or -leftX + 1 or -leftX + 2 - check(tileMatrix.size in (1 - 2 * leftX)..(3 - 2 * leftX)) { + // rightX is between -leftX - 1 (e.g. 105x90 map thanks @ravignir) and -leftX + 2 + check(tileMatrix.size in (- 2 * leftX)..(3 - 2 * leftX)) { "TileMap.setTransients called on existing tileMatrix of different size" } }