Implement max palette count

This commit is contained in:
ISSOtm
2022-03-12 17:19:54 +01:00
committed by Eldred Habert
parent d2f9cc7e8c
commit 943d631701
2 changed files with 6 additions and 1 deletions

View File

@@ -937,6 +937,11 @@ contained:;
}
}
if (palettes.size() > options.nbPalettes) {
// If the palette generation is wrong, other (dependee) operations are likely to be nonsensical, so fatal-error outright
fatal("Generated %zu palettes, over the maximum of %" PRIu8, palettes.size(), options.nbPalettes);
}
if (!options.palettes.empty()) {
outputPalettes(palettes);
}