summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-10 23:18:41 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-10 23:18:41 -0400
commitd7494dd77e51143d08ce23337f03f93a5286234a (patch)
tree289978f4a34be0f04dc99927f7de1fadef64e12b /config.c
parent39d7cea180c3571d79d74d4efcd0efd9f820b53a (diff)
Fixed a bug in `parse_config()` that was caused by not
zeroing `cfg`.
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.c b/config.c
index 8f5722b..5f464d1 100644
--- a/config.c
+++ b/config.c
@@ -138,6 +138,8 @@ config *parse_config(const char *filename) {
return NULL;
}
+ memset(cfg, 0, sizeof(config));
+
while (*tmp != '\0') {
char *line = get_line(&tmp);
char *value;