Parse inline palette specs after getting CLI palette size limit (#2054)

This commit is contained in:
Rangi authored and GitHub committed 2026-09-10 18:54:24 +02:00
1 parent 631ef003e7
commit 8a6b1946e3
8 files changed
+67 -48

No files matched your search

+2 -2
View File
@@ -249,7 +249,7 @@ void reverse() {
);
}
if (options.palSpecType == Options::EXPLICIT && palettes != options.palSpec) {
if (options.hasExplicitPalSpec() && palettes != options.palSpec) {
warnx("Colors in the palette file do not match those specified with '-c'");
// This spacing aligns "...versus with `-c`" above the column of `-c` palettes
fputs("Colors specified in the palette file: ...versus with '-c':\n", stderr);
@@ -273,7 +273,7 @@ void reverse() {
} else if (options.palSpecType == Options::EMBEDDED) {
warnx("An embedded palette was requested, but no palette file was specified; ignoring "
"request");
} else if (options.palSpecType == Options::EXPLICIT) {
} else if (options.hasExplicitPalSpec()) {
palettes = std::move(options.palSpec); // We won't be using it again.
}