summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-12-27 01:33:07 +0100
committerstuebinm2021-12-27 01:33:07 +0100
commitc56ffe0e9454b34992bc7ddcc25a2d1c9894128e (patch)
tree03c3624df23a310f13102b363aa22ebfbc5d920f
parent4c84f7db1d43f0b13b03fe5c3d613ac2dc54bc56 (diff)
type systems don't protect against off-by-one
-rw-r--r--lib/Properties.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 4e8c7d9..9a22bb5 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -168,7 +168,7 @@ checkTileset = do
unless (tilesetTilewidth tileset == 32 && tilesetTileheight tileset == 32)
$ complain "Tilesets must have tile size 32x32."
- unless (tilesetImageheight tileset < 4096 && tilesetImagewidth tileset < 4096)
+ when (tilesetImageheight tileset > 4096 || tilesetImagewidth tileset > 4096)
$ warn "Tilesets should not be larger than 4096x4096 pixels in total."
when (isJust (tilesetSource tileset))