]> ToastFreeware Gitweb - gregoa/bti.git/blobdiff - config.c
fix common misspellings
[gregoa/bti.git] / config.c
index 42a038422e0e7231d6bf42e9345610a18bf428d9..e06f480bc87078a5585e373a035634042332ee9a 100644 (file)
--- a/config.c
+++ b/config.c
@@ -355,9 +355,18 @@ void bti_parse_configfile(struct session *session)
                if (line == hashmarker)
                        line[0] = '\0';
                else {
-                       --hashmarker;
-                       if (isblank(hashmarker[0]))
-                               hashmarker[0] = '\0';
+                       while (hashmarker[0] != '\0') {
+                               --hashmarker;
+                               if (isblank(hashmarker[0]))
+                                       hashmarker[0] = '\0';
+                               else {
+                                       /*
+                                        * false positive; '#' occured
+                                        * within a string
+                                        */
+                                       hashmarker = strchrnul(hashmarker+2, '#');
+                               }
+                       }
                }
                c = line;
                while (isspace(*c))