Fix configuration file backward compatibility

We kinda broke this in 6377582841118688aee13aff98c9216403582e45.

All hail strsep()!

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-07-29 23:35:17 +02:00
parent 53b041facf
commit 6256183e1e

View File

@ -393,8 +393,13 @@ custom_load_conf (struct conf *conf)
if (*e_conf == '\0') if (*e_conf == '\0')
continue; continue;
name = strtok (e_conf, "="); name = e_conf;
val = strtok (NULL, "\0"); val = strchr (e_conf, '=');
if (val)
{
*val = '\0';
val++;
}
var = CUSTOM_CONF_INVALID; var = CUSTOM_CONF_INVALID;
for (i = 0; i < sizeof (conf_varmap) / sizeof (struct conf_varname); i++) for (i = 0; i < sizeof (conf_varmap) / sizeof (struct conf_varname); i++)