summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}