projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rnd-20131028-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
misc.c
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index 4c94b7784985f37b466864f8f8bbe2345fe4106b..60dbcf068c20e9d84a29a6d4de15356d1ce15892 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-1193,7
+1193,8
@@
boolean getFileChunk(FILE *file, char *chunk_name, int *chunk_size,
const int chunk_name_length = 4;
/* read chunk name */
- fgets(chunk_name, chunk_name_length + 1, file);
+ if (fgets(chunk_name, chunk_name_length + 1, file) == NULL)
+ return FALSE;
if (chunk_size != NULL)
{