mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Bugfix in png_load.cpp
This commit is contained in:
parent
4b123b25cc
commit
ae8688f245
1 changed files with 3 additions and 3 deletions
|
@ -31,8 +31,8 @@ int pngLoad(const char *file, int *pwidth,
|
|||
// ... but 'n' will always be the number that it would have been if you said 0
|
||||
|
||||
// TODO: Get rid of this silly copy which is only to make the buffer free-able with free()
|
||||
*image_data_ptr = (unsigned char *)malloc(x * y * n);
|
||||
memcpy(*image_data_ptr, data, x * y * n);
|
||||
*image_data_ptr = (unsigned char *)malloc(x * y * 4);
|
||||
memcpy(*image_data_ptr, data, x * y * 4);
|
||||
stbi_image_free(data);
|
||||
return 1;
|
||||
}
|
||||
|
@ -134,4 +134,4 @@ int pngLoad(const char *file, int *pwidth,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue