mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fixed a case of using new[]/delete[] when malloc/free should have been used.
--HG-- branch : minor
This commit is contained in:
@@ -65,8 +65,8 @@ FormatHandler::DecodedImage STBHandler::decode(love::filesystem::FileData *data)
|
||||
int comp = 0;
|
||||
img.data = stbi_load_from_memory((const stbi_uc *) data->getData(),
|
||||
(int) data->getSize(),
|
||||
&img.width, &img.height,
|
||||
&comp, 4);
|
||||
&img.width, &img.height,
|
||||
&comp, 4);
|
||||
|
||||
if (img.data == nullptr || img.width <= 0 || img.height <= 0)
|
||||
throw love::Exception("Could not decode TGA or BMP image.");
|
||||
|
||||
Reference in New Issue
Block a user