summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-12-27 01:33:07 +0100
committerstuebinm2022-01-02 01:55:49 +0100
commit3839365c752edd7a802f88c8ef6ea4154745ac98 (patch)
tree03c3624df23a310f13102b363aa22ebfbc5d920f
parente03d5514f38ed4c2f1345c2eaf82789af00136ab (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))