diff options
Diffstat (limited to 'progs/glsl/shtest.c')
-rw-r--r-- | progs/glsl/shtest.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/progs/glsl/shtest.c b/progs/glsl/shtest.c index 88315d7461..e9800c307f 100644 --- a/progs/glsl/shtest.c +++ b/progs/glsl/shtest.c @@ -492,9 +492,8 @@ ReadConfigFile(const char *filename, struct config_file *conf) conf->num_uniforms = 0; /* ugly but functional parser */ - while (!feof(f)) { - fgets(line, sizeof(line), f); - if (!feof(f) && line[0]) { + while (fgets(line, sizeof(line), f) != NULL) { + if (line[0]) { if (strncmp(line, "vs ", 3) == 0) { VertShaderFile = strdup(line + 3); VertShaderFile[strlen(VertShaderFile) - 1] = 0; |