Fix range handling
authorDenis Kenzior <denkenz@gmail.com>
Wed, 15 Jul 2009 16:43:29 +0000 (11:43 -0500)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 15 Jul 2009 16:59:37 +0000 (18:59 +0200)
gatchat/gatresult.c

index 9c382d9..389f7e8 100644 (file)
@@ -274,15 +274,12 @@ gboolean g_at_result_iter_next_range(GAtResultIter *iter, gint *min, gint *max)
        if (pos == end)
                return FALSE;
 
-       if (line[end] == ',') {
+       if (line[end] != '-') {
                high = low;
                goto out;
        }
 
-       if (line[end] == '-')
-               pos = end = end + 1;
-       else
-               return FALSE;
+       pos = end = end + 1;
 
        while (line[end] >= '0' && line[end] <= '9') {
                high = high * 10 + (int)(line[end] - '0');