diff options
author | stuebinm | 2021-12-27 01:33:07 +0100 |
---|---|---|
committer | stuebinm | 2022-01-02 01:55:49 +0100 |
commit | 3839365c752edd7a802f88c8ef6ea4154745ac98 (patch) | |
tree | 03c3624df23a310f13102b363aa22ebfbc5d920f /lib | |
parent | e03d5514f38ed4c2f1345c2eaf82789af00136ab (diff) |
type systems don't protect against off-by-one
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Properties.hs | 2 |
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)) |