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:
James Chen 2014-04-09 16:43:13 +08:00
commit 1eae592ed8
1 changed files with 1 additions and 1 deletions

View File

@ -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);