chiark / gitweb /
fix quoted parser
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Jan 2010 01:16:51 +0000 (02:16 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 27 Jan 2010 01:16:51 +0000 (02:16 +0100)
util.c

diff --git a/util.c b/util.c
index 7c39353..c7b2ca8 100644 (file)
--- a/util.c
+++ b/util.c
@@ -253,7 +253,7 @@ char *split_quoted(const char *c, size_t *l, char **state) {
                         (*state)++;
         } else if (*current == '\"') {
                 current ++;
                         (*state)++;
         } else if (*current == '\"') {
                 current ++;
-                *l = strcspn(current+1, "\"");
+                *l = strcspn(current, "\"");
                 *state = current+*l;
 
                 if (**state == '\"')
                 *state = current+*l;
 
                 if (**state == '\"')