Fix inverted condition in tile dedup warning

This commit is contained in:
ISSOtm
2022-04-16 23:53:42 +02:00
committed by Eldred Habert
parent 7fdc6cbced
commit 7fdfbbbbba

View File

@@ -83,7 +83,7 @@ void reverse() {
fatal("Tile data must be provided when reversing an image!"); 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?"); warning("Tile deduplication is enabled, but no tilemap is provided?");
} }
@@ -126,14 +126,14 @@ void reverse() {
fatal( fatal(
"No input slice specified (`-L`), and specified image width (%zu) not a multiple of 8", "No input slice specified (`-L`), and specified image width (%zu) not a multiple of 8",
usefulWidth); usefulWidth);
} else { }
width = usefulWidth / 8; width = usefulWidth / 8;
if (nbTileInstances % width != 0) { if (nbTileInstances % width != 0) {
fatal("Total number of tiles read (%zu) cannot be divided by image width (%zu tiles)", fatal("Total number of tiles read (%zu) cannot be divided by image width (%zu tiles)",
nbTileInstances, width); nbTileInstances, width);
} }
height = nbTileInstances / width; height = nbTileInstances / width;
}
options.verbosePrint(Options::VERB_INTERM, "Reversed image dimensions: %zux%zu tiles\n", width, options.verbosePrint(Options::VERB_INTERM, "Reversed image dimensions: %zux%zu tiles\n", width,
height); height);