apng_create_info_struct: Swap order of calloc params

Instead of making one apng_info sized struct, it was making apng_info's size many bytes. Which SHOULD be identical, but in the case of padding may not be. Certainly enough of a risk for the compiler to warn about it
This commit is contained in:
toaster 2025-05-18 15:39:00 +01:00
parent 1c7b26639a
commit cbd7803e61

View file

@ -71,7 +71,7 @@ apng_create_info_struct (png_structp pngp)
{
apng_infop ainfop;
(void)pngp;
if (( ainfop = calloc(sizeof (apng_info),1) ))
if (( ainfop = calloc(1, sizeof (apng_info)) ))
{
apng_set_write_fn(pngp, ainfop, 0, 0, 0, 0, 0);
apng_set_set_acTL_fn(pngp, ainfop, 0);