image_read returns size_t, so 0 when error or end of file

This commit is contained in:
Pali Rohár committed 2012-08-11 21:23:53 +02:00
1 parent 17c6aefdcb
commit 26099e9536
3 files changed
+6 -5

No files matched your search

+1
View File
@@ -419,6 +419,7 @@ enum image_type image_type_from_data(struct image * image) {
unsigned char buf[512];
memset(buf, 0, sizeof(buf));
image_seek(image, 0);
image_read(image, buf, sizeof(buf));