diff --git a/src/script/api/script_tile.cpp b/src/script/api/script_tile.cpp index 90276de8d4..a1be12e084 100644 --- a/src/script/api/script_tile.cpp +++ b/src/script/api/script_tile.cpp @@ -48,7 +48,7 @@ /* static */ bool ScriptTile::IsBuildableRectangle(TileIndex tile, SQInteger width, SQInteger height) { /* Check whether we can extract valid X and Y */ - if (!::IsValidTile(tile) || width < 0 || height < 0) return false; + if (!::IsValidTile(tile) || width < 1 || height < 1) return false; uint tx = ScriptMap::GetTileX(tile); uint ty = ScriptMap::GetTileY(tile); diff --git a/src/script/api/script_tile.hpp b/src/script/api/script_tile.hpp index dc41f74822..515c3208fe 100644 --- a/src/script/api/script_tile.hpp +++ b/src/script/api/script_tile.hpp @@ -157,8 +157,8 @@ public: * @param width The width of the rectangle. * @param height The height of the rectangle. * @pre ScriptMap::IsValidTile(tile). - * @pre width >= 0. - * @pre height >= 0. + * @pre width > 0. + * @pre height > 0. * @return True if it is buildable, false if not. */ static bool IsBuildableRectangle(TileIndex tile, SQInteger width, SQInteger height);