Fix ProtoPalette::compare

The function only stopped at the end of the *arrays*,
not of *their used portions*!
This could cause false negatives one way or the other.

This appears not to affect the palette packing, since the packing algorithm
deals with them efficiently; but it should speed up processing slightly,
and as the test changes show, it also improves the UX of palette packing
error messages!
This commit is contained in:
ISSOtm
2024-08-14 17:30:56 +02:00
parent c42e856efb
commit 68a6abd00e
3 changed files with 5 additions and 12 deletions

View File

@@ -1,6 +1,5 @@
error: Failed to fit tile colors [$6c8a, $7f55, $7fff] in specified palettes
error: Failed to fit tile colors [$6c8a, $7f55] in specified palettes
note: The following palettes were specified:
[$7fff, $7f55]
[$7fff, $6c8a]
Conversion aborted after 2 errors
Conversion aborted after 1 error