Skip to content

Commit

Permalink
Compare size with 0, not NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
q4a authored and eagleivg committed Nov 6, 2018
1 parent ba7e3d3 commit a66e449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Externals/cximage/ximaenc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ bool CxImage::CheckFormat(CxFile * hFile, DWORD imagetype)
////////////////////////////////////////////////////////////////////////////////
bool CxImage::CheckFormat(BYTE * buffer, DWORD size, DWORD imagetype)
{
if (buffer==NULL || size==NULL){
if (buffer==NULL || size==0){
strcpy(info.szLastError,"invalid or empty buffer");
return false;
}
Expand Down

0 comments on commit a66e449

Please sign in to comment.