mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Changed code to avoid compiler warning.
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402676
This commit is contained in:
parent
99913d4b7d
commit
1f896c1fee
@ -100,7 +100,11 @@ namespace dlib
|
||||
throw image_load_error(std::string("png_loader: unable to open file ") + filename);
|
||||
}
|
||||
png_byte sig[8];
|
||||
fread( sig, 1, 8, fp );
|
||||
if (fread( sig, 1, 8, fp ) != 8)
|
||||
{
|
||||
fclose( fp );
|
||||
throw image_load_error(std::string("png_loader: error reading file ") + filename);
|
||||
}
|
||||
if ( png_sig_cmp( sig, 0, 8 ) != 0 )
|
||||
{
|
||||
fclose( fp );
|
||||
|
Loading…
Reference in New Issue
Block a user