Fixes null ptr in gcc, probably to do with operator precedence. @Bigpet was all over this one.

This commit is contained in:
Ben Anderson 2014-03-30 03:21:41 +13:00
parent 84c9323750
commit 33f7f37ca7

View File

@ -155,7 +155,7 @@ int cellPngDecDecodeData(u32 mainHandle, u32 subHandle, mem8_ptr_t data, const m
//Decode PNG file. (TODO: Is there any faster alternative? Can we do it without external libraries?)
int width, height, actual_components;
std::shared_ptr<unsigned char> image(stbi_load_from_memory(png, fileSize, &width, &height, &actual_components, 4));
std::shared_ptr<unsigned char> image(stbi_load_from_memory(png.GetPtr(), fileSize, &width, &height, &actual_components, 4));
if (!image) return CELL_PNGDEC_ERROR_STREAM_FORMAT;
uint image_size = width * height;