From 41046c287fefd9c08a1b4ac70aec433878a47945 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 2 Aug 2024 21:59:51 +0200 Subject: [PATCH] Use appropriate format specifier for number of palettes --- src/gfx/main.cpp | 2 +- src/gfx/process.cpp | 2 +- src/gfx/reverse.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gfx/main.cpp b/src/gfx/main.cpp index 676f3653..2db56f8f 100644 --- a/src/gfx/main.cpp +++ b/src/gfx/main.cpp @@ -762,7 +762,7 @@ int main(int argc, char *argv[]) { fprintf(stderr, "\tBit depth: %" PRIu8 "bpp\n", options.bitDepth); if (options.trim != 0) fprintf(stderr, "\tTrim the last %" PRIu64 " tiles\n", options.trim); - fprintf(stderr, "\tMaximum %" PRIu8 " palettes\n", options.nbPalettes); + fprintf(stderr, "\tMaximum %" PRIu16 " palettes\n", options.nbPalettes); fprintf(stderr, "\tPalettes contain %" PRIu8 " colors\n", options.nbColorsPerPal); fprintf(stderr, "\t%s palette spec\n", [] { switch (options.palSpecType) { diff --git a/src/gfx/process.cpp b/src/gfx/process.cpp index 734af628..c77975ab 100644 --- a/src/gfx/process.cpp +++ b/src/gfx/process.cpp @@ -683,7 +683,7 @@ static void outputPalettes(std::vector const &palettes) { // 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, + "Generated %zu palettes, over the maximum of %" PRIu16, palettes.size(), options.nbPalettes ); diff --git a/src/gfx/reverse.cpp b/src/gfx/reverse.cpp index b539eb69..a3c73cbb 100644 --- a/src/gfx/reverse.cpp +++ b/src/gfx/reverse.cpp @@ -191,7 +191,7 @@ void reverse() { if (palettes.size() > options.nbPalettes) { warning( - "Read %zu palettes, more than the specified limit of %" PRIu8, + "Read %zu palettes, more than the specified limit of %" PRIu16, palettes.size(), options.nbPalettes );