summaryrefslogtreecommitdiff
path: root/progs/demos/terrain.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/demos/terrain.c')
-rw-r--r--progs/demos/terrain.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/demos/terrain.c b/progs/demos/terrain.c
index be78ea4950..9ba7b61a63 100644
--- a/progs/demos/terrain.c
+++ b/progs/demos/terrain.c
@@ -8,6 +8,7 @@
* based on a Mikael SkiZoWalker's (MoDEL) / France (Skizo@Hol.Fr) demo
*/
+#include <assert.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
@@ -559,12 +560,14 @@ loadpic(void)
FILE *FilePic;
int i, tmp;
GLenum gluerr;
+ size_t result;
if ((FilePic = fopen("terrain.dat", "r")) == NULL) {
fprintf(stderr, "Error loading terrain.dat\n");
exit(-1);
}
- fread(bufferter, 256 * 256, 1, FilePic);
+ result = fread(bufferter, 256 * 256, 1, FilePic);
+ assert(result == 1);
fclose(FilePic);
for (i = 0; i < (256 * 256); i++) {