From 6256183e1e8a7ba09e12b9216ecaa730bb1ec114 Mon Sep 17 00:00:00 2001
From: Lukas Fleischer <calcurse@cryptocrack.de>
Date: Fri, 29 Jul 2011 23:35:17 +0200
Subject: Fix configuration file backward compatibility

We kinda broke this in 6377582841118688aee13aff98c9216403582e45.

All hail strsep()!

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
---
 src/custom.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'src')

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++)
-- 
cgit v1.2.3-70-g09d2