diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-29 23:35:17 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-29 23:35:17 +0200 |
commit | 6256183e1e8a7ba09e12b9216ecaa730bb1ec114 (patch) | |
tree | 4b8bedf8aecf8c3f7fb5e0684bcc47e3d94f0cce /src | |
parent | 53b041facf84182cd4303d46a6e940113f3030b2 (diff) | |
download | calcurse-6256183e1e8a7ba09e12b9216ecaa730bb1ec114.zip |
Fix configuration file backward compatibility
We kinda broke this in 6377582841118688aee13aff98c9216403582e45.
All hail strsep()!
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/custom.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/custom.c b/src/custom.c index 747d4d8..6385593 100644 --- a/src/custom.c +++ b/src/custom.c @@ -393,8 +393,13 @@ custom_load_conf (struct conf *conf) if (*e_conf == '\0') continue; - name = strtok (e_conf, "="); - val = strtok (NULL, "\0"); + name = e_conf; + val = strchr (e_conf, '='); + if (val) + { + *val = '\0'; + val++; + } var = CUSTOM_CONF_INVALID; for (i = 0; i < sizeof (conf_varmap) / sizeof (struct conf_varname); i++) |