mirror of
https://github.com/gbdev/rgbds.git
synced 2026-11-29 23:08:39 +00:00
Fix reversing an image with an empty -c/--colors spec file (#2228)
This commit is contained in:
1 parent
b99069e25d
commit
1e9e2ad5fa
5 files changed
+15
No files matched your search
@@ -288,6 +288,18 @@ void reverse() {
|
||||
grayscale = true;
|
||||
} else if (options.hasExplicitPalSpec()) {
|
||||
palettes = std::move(options.palSpec); // We won't be using it again.
|
||||
|
||||
if (palettes.empty()) {
|
||||
fatal("Specified 0 palettes");
|
||||
}
|
||||
|
||||
if (palettes.size() > options.nbPalettes) {
|
||||
warnx(
|
||||
"Specified %zu palettes, more than the specified limit of %" PRIu16,
|
||||
palettes.size(),
|
||||
options.nbPalettes
|
||||
);
|
||||
}
|
||||
} else {
|
||||
grayscale = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user