Skip to content

Commit 60dc3fb

Browse files
ggggamerminggo
authored andcommitted
fix ZipUtils memory-malloc succ check error. (cocos2d#19923)
1 parent 7b7cf55 commit 60dc3fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/base/ZipUtils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int ZipUtils::inflateGZipFile(const char *path, unsigned char **out)
267267
unsigned int totalBufferSize = bufferSize;
268268

269269
*out = (unsigned char*)malloc( bufferSize );
270-
if( ! out )
270+
if(*out == NULL)
271271
{
272272
CCLOG("cocos2d: ZipUtils: out of memory");
273273
return -1;

0 commit comments

Comments
 (0)