From 9995f492ca8a044a27726c0aa871f5f8c7d18076 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 03 Mar 2013 00:52:10 -0500 Subject: src/resources/palette.c: Fix EOF handling. --- (limited to 'src') diff --git a/src/resources/palette.c b/src/resources/palette.c index 3cb1a85..2470f70 100644 --- a/src/resources/palette.c +++ b/src/resources/palette.c @@ -140,6 +140,9 @@ palette_gpl_parse(const char *path, SDL_Palette *palette) } if (fgets(str, sizeof(str), fp) == NULL) { + if (feof(fp)) { + break; + } err(1, "Failed to load palette \"%s\" " "(cannot read line)", path); } -- cgit v0.9.1