From 7fdfbbbbba0d91e684b9d66fdb41b175287ce02e Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sat, 16 Apr 2022 23:53:42 +0200 Subject: [PATCH] Fix inverted condition in tile dedup warning --- src/gfx/reverse.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gfx/reverse.cpp b/src/gfx/reverse.cpp index 065f03ec..7f0512e2 100644 --- a/src/gfx/reverse.cpp +++ b/src/gfx/reverse.cpp @@ -83,7 +83,7 @@ void reverse() { fatal("Tile data must be provided when reversing an image!"); } - if (!options.allowDedup && options.tilemap.empty()) { + if (options.allowDedup && options.tilemap.empty()) { warning("Tile deduplication is enabled, but no tilemap is provided?"); } @@ -126,14 +126,14 @@ void reverse() { fatal( "No input slice specified (`-L`), and specified image width (%zu) not a multiple of 8", usefulWidth); - } else { - width = usefulWidth / 8; - if (nbTileInstances % width != 0) { - fatal("Total number of tiles read (%zu) cannot be divided by image width (%zu tiles)", - nbTileInstances, width); - } - height = nbTileInstances / width; } + width = usefulWidth / 8; + if (nbTileInstances % width != 0) { + fatal("Total number of tiles read (%zu) cannot be divided by image width (%zu tiles)", + nbTileInstances, width); + } + height = nbTileInstances / width; + options.verbosePrint(Options::VERB_INTERM, "Reversed image dimensions: %zux%zu tiles\n", width, height);