diff options
Diffstat (limited to 'progs/demos/terrain.c')
-rw-r--r-- | progs/demos/terrain.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/demos/terrain.c b/progs/demos/terrain.c index 627c3bfb57a..a72c8d3caea 100644 --- a/progs/demos/terrain.c +++ b/progs/demos/terrain.c @@ -8,6 +8,7 @@ * based on a Mikael SkiZoWalker's (MoDEL) / France ([email protected]) 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++) { |