mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Fixes null ptr in gcc, probably to do with operator precedence. @Bigpet was all over this one.
This commit is contained in:
parent
84c9323750
commit
33f7f37ca7
1 changed files with 1 additions and 1 deletions
|
@ -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?)
|
//Decode PNG file. (TODO: Is there any faster alternative? Can we do it without external libraries?)
|
||||||
int width, height, actual_components;
|
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;
|
if (!image) return CELL_PNGDEC_ERROR_STREAM_FORMAT;
|
||||||
|
|
||||||
uint image_size = width * height;
|
uint image_size = width * height;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue