mirror of https://github.com/mgba-emu/mgba.git
Util: Fix excessive memory allocation when decoding a PNG
This commit is contained in:
parent
71ef6666d0
commit
67bc8e73a3
1
CHANGES
1
CHANGES
|
@ -19,6 +19,7 @@ Bugfixes:
|
|||
- GBA: Fix warnings when creating and loading savestates
|
||||
- GBA Memory: Fix DMAs triggering two cycles early
|
||||
- GBA Hardware: Fix GPIO on big endian
|
||||
- Util: Fix excessive memory allocation when decoding a PNG
|
||||
Misc:
|
||||
- Qt: Window size command line options are now supported
|
||||
- Qt: Increase usability of key mapper
|
||||
|
|
|
@ -52,7 +52,7 @@ png_infop PNGWriteHeader(png_structp png, unsigned width, unsigned height) {
|
|||
}
|
||||
|
||||
bool PNGWritePixels(png_structp png, unsigned width, unsigned height, unsigned stride, const void* pixels) {
|
||||
png_bytep row = malloc(sizeof(png_bytep) * width * 3);
|
||||
png_bytep row = malloc(sizeof(png_byte) * width * 3);
|
||||
if (!row) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue