From 1fca0b9737dcd80519c56853be6ef196e76c5fe1 Mon Sep 17 00:00:00 2001 From: Richard Geldreich Date: Fri, 23 Oct 2026 18:01:18 -0400 Subject: [PATCH] basisu -info (PNG): a file over the loader's dimension cap is a failure (EXIT_FAILURE) Co-Authored-By: Claude Opus 5.5 --- basisu_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/basisu_tool.cpp b/basisu_tool.cpp index db57ea5..bda9a99 100644 --- a/basisu_tool.cpp +++ b/basisu_tool.cpp @@ -5433,7 +5433,11 @@ static bool print_png_info(const char* pInput_filename, const uint8_vec& file_da } printf("Dimensions: %ux%u\n", width, height); if ((width > BASISU_WUFFS_LDR_MAX_DIM) || (height > BASISU_WUFFS_LDR_MAX_DIM)) - printf("Exceeds the maximum loadable dimension (%u), this file can't be loaded\n", (uint32_t)BASISU_WUFFS_LDR_MAX_DIM); + { + // A file the loader can't load is a failure (EXIT_FAILURE), even though its header was printed. + error_printf("Exceeds the maximum loadable dimension (%u), this file can't be loaded\n", (uint32_t)BASISU_WUFFS_LDR_MAX_DIM); + return false; + } return true; #else pv_png::png_info info;