From 61db4a1d718891dc176cf95c44d049bc02e7b6bb Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 29 Mar 2014 12:51:40 +0100 Subject: [PATCH] shl: fix shl_qstr_tokenize() quote parser The parser is simply broken, fix it. Signed-off-by: David Herrmann --- src/shared/shl_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/shl_util.c b/src/shared/shl_util.c index 8508156..1d3f662 100644 --- a/src/shared/shl_util.c +++ b/src/shared/shl_util.c @@ -617,9 +617,9 @@ int shl_qstr_tokenize_n(const char *str, size_t length, char ***out) quoted = 0; else if (str[i] == '\'' && quoted == '\'') quoted = 0; - } else if (str[i] == '"' && quoted == '"') { + } else if (str[i] == '"') { quoted = '"'; - } else if (str[i] == '\'' && quoted == '\'') { + } else if (str[i] == '\'') { quoted = '\''; } else if (str[i] == ' ') { /* ignore multiple separators */