libsdl-org / SDL_image

Image decoding for many popular formats for Simple Directmedia Layer.
zlib License
559 stars 182 forks source link

printf format mismatch in "xcf: use SDL_PRIx macros in debug messages"? #411

Closed smcv closed 8 months ago

smcv commented 8 months ago

6d91bf78 has this:

     }
 #if DEBUG
-    SDL_Log("%.8" SDL_PRIs64 ": %s(%u): %u\n", SDL_RWtell (src), prop->id < 25 ? prop_names [prop->id] : "unknown", prop->id, prop->length);
+    SDL_Log("%.8" SDL_PRIu32 ": %s(%u): %u\n", SDL_RWtell (src), prop->id < 25 ? prop_names [prop->id] : "unknown", prop->id, prop->length);
 #endif

     switch (prop->id) {

which seems wrong? SDL_RWtell() returns Sint64, so I would have expected SDL_PRIs64 to be correct.

(This is a drive-by comment while updating the snapshot of SDL3 in Debian experimental, I haven't actually tried compiling with debug enabled.)

cc @madebr

madebr commented 8 months ago

Oops. Thanks for the drive-by comment :)

madebr commented 8 months ago

I fixed this in 2487900