crunch icon indicating copy to clipboard operation
crunch copied to clipboard

`crn_decompress_dds_to_images()` is returning an array of null pointers

Open illwieckz opened this issue 1 year ago • 0 comments

The crn_decompress_dds_to_images() function is expected to populate the ppImages array with pointers to mipmap images.

But pImg->get_pixel_buf().assume_ownership() always return a null pointer when called in crn_decompress_dds_to_images().

Here is how to reproduce (better use the branch from #61):

./crunch -file ../test/unvanquished_64.png -out test.dds
./example1 d test.dds -out test.tga

The second command is expected to write one tga file per mipmap, but it segfaults because of attempting to read null pointers.

illwieckz avatar Jul 07 '24 23:07 illwieckz