Fix reversing an image with an empty -p/--palette file (#2227)

This commit is contained in:
Rangi authored and GitHub committed 2026-10-22 14:41:11 -04:00
1 parent cc88a7a437
commit b99069e25d
5 files changed
+7

No files matched your search

+4
View File
@@ -235,6 +235,10 @@ void reverse() {
}
}
if (palettes.empty()) {
fatal("Read 0 palettes");
}
if (palettes.size() > options.nbPalettes) {
warnx(
"Read %zu palettes, more than the specified limit of %" PRIu16,