mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6194 from iSevenDays/patch-2
Result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG.
This commit is contained in:
commit
1eae592ed8
|
@ -2023,7 +2023,7 @@ bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB)
|
|||
{
|
||||
if (isToRGB)
|
||||
{
|
||||
unsigned char *pTempData = static_cast<unsigned char*>(malloc(_width * _height * 3 * sizeof(unsigned char*)));
|
||||
unsigned char *pTempData = static_cast<unsigned char*>(malloc(_width * _height * 3 * sizeof(unsigned char)));
|
||||
if (nullptr == pTempData)
|
||||
{
|
||||
fclose(fp);
|
||||
|
|
Loading…
Reference in New Issue