From c56ffe0e9454b34992bc7ddcc25a2d1c9894128e Mon Sep 17 00:00:00 2001
From: stuebinm <stuebinm@disroot.org>
Date: Mon, 27 Dec 2021 01:33:07 +0100
Subject: [PATCH] type systems don't protect against off-by-one

---
 lib/Properties.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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))
-- 
GitLab