summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-09-30 17:50:31 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-10-01 00:06:32 -0700
commit840420f4014e03318d4258f934110ddb11c11942 (patch)
treee6a690afe89c5113bbbacabf89f7b127ecbc08d1
parent7c54b09c5133ca0da6079c590032891ac8638abf (diff)
downloadtmwa-840420f4014e03318d4258f934110ddb11c11942.tar.gz
tmwa-840420f4014e03318d4258f934110ddb11c11942.tar.bz2
tmwa-840420f4014e03318d4258f934110ddb11c11942.tar.xz
tmwa-840420f4014e03318d4258f934110ddb11c11942.zip
Fix abuse of fread.
-rw-r--r--src/common/grfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 5e03b7c..d640263 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -201,7 +201,7 @@ void *grfio_reads (const char *fname, size_t *size)
}
uint8_t *buf2;
CREATE (buf2, uint8_t, lentry.declen + 1024);
- if (!fread (buf2, 1, lentry.declen, in))
+ if (fread (buf2, 1, lentry.declen, in) != lentry.declen)
exit(1);
fclose_ (in);
in = NULL;