Handle right bracket in next_unquoted_string
authorZhenhua Zhang <zhenhua.zhang@intel.com>
Thu, 22 Oct 2009 16:47:08 +0000 (00:47 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 24 Oct 2009 08:46:40 +0000 (17:46 +0900)
gatchat/gatresult.c

index 1436ae3..3d07e13 100644 (file)
@@ -131,12 +131,12 @@ gboolean g_at_result_iter_next_unquoted_string(GAtResultIter *iter,
                goto out;
        }
 
-       if (line[pos] == '"')
+       if (line[pos] == '"' || line[pos] == ')')
                return FALSE;
 
        end = pos;
 
-       while (end < len && line[end] != ',')
+       while (end < len && line[end] != ',' && line[end] != ')')
                end += 1;
 
        iter->buf[end] = '\0';