mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Bugfix in png_load.cpp
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user