chiark / gitweb /
fix quoted parser
[elogind.git] / util.c
diff --git a/util.c b/util.c
index 7c3935353ce36df0e01df61582510b0033cd48f5..c7b2ca8516fa663f0d65158850e29088241dd143 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 ++;
-                *l = strcspn(current+1, "\"");
+                *l = strcspn(current, "\"");
                 *state = current+*l;
 
                 if (**state == '\"')