projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix all remaining compiler warnings
[ctsim.git]
/
libctsim
/
imagefile.cpp
diff --git
a/libctsim/imagefile.cpp
b/libctsim/imagefile.cpp
index eeda46d37d4300f4662d15ac2924fa88ebdaa311..8710e5a002eae10c85804ec1aee911b7c8e66d22 100644
(file)
--- a/
libctsim/imagefile.cpp
+++ b/
libctsim/imagefile.cpp
@@
-1545,8
+1545,8
@@
ImageFile::readImagePNG (const char* const pszFile)
if (!fp)
return false;
unsigned char header[8];
- fread (header, 1, 8, fp);
- if (png_sig_cmp (header, 0, 8)) {
+
int n =
fread (header, 1, 8, fp);
+ if (
n != 8 ||
png_sig_cmp (header, 0, 8)) {
fclose (fp);
return false;
}