summaryrefslogtreecommitdiffstats
path: root/src/resources
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-03-03 00:52:10 (EST)
committer P. J. McDermott <pjm@nac.net>2013-03-03 00:52:10 (EST)
commit9995f492ca8a044a27726c0aa871f5f8c7d18076 (patch)
tree52831a00df8d6427df3efd6ec8b95725ae4b6cbd /src/resources
parent446535d4d315b226416b8543765ca17d8078a22c (diff)
downloadoverworld-rpg-9995f492ca8a044a27726c0aa871f5f8c7d18076.zip
overworld-rpg-9995f492ca8a044a27726c0aa871f5f8c7d18076.tar.gz
overworld-rpg-9995f492ca8a044a27726c0aa871f5f8c7d18076.tar.bz2
src/resources/palette.c: Fix EOF handling.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/palette.c3
1 files changed, 3 insertions, 0 deletions
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);
}