From: Elias Fleckenstein Date: Sat, 22 Jan 2022 13:16:12 +0000 (+0100) Subject: Fix snapshot build error X-Git-Tag: 0.2.2~14 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=d8982996ab1a126126107a5ffbc80f670c408564;p=dragonblocks_alpha.git Fix snapshot build error --- diff --git a/src/config.c b/src/config.c index 0af1827..8bdfa54 100644 --- a/src/config.c +++ b/src/config.c @@ -15,7 +15,8 @@ void config_read(char *path, ConfigEntry *entries, size_t num_entries) while (! feof(f)) { char key[BUFSIZ]; - fscanf(f, "%s", key); + if (! fscanf(f, "%s", key)) + break; bool found = false; for (size_t i = 0; i < num_entries; i++) {