fixed a bug in if statement that prevent the function to read x-y format string right.
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 6 Oct 2009 02:07:53 +0000 (02:07 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 6 Oct 2009 02:07:53 +0000 (02:07 +0000)
src/util/ckliststring.h

index 566f32f9fcde08d52d81a0258eb3b3719d0f4d04..7f499c820fcb1a64f96e8fbece77a663931de097 100644 (file)
@@ -34,12 +34,14 @@ public:
       }
       int start, end, stride=1;
       if (hasdash) {
-          if (hascolon)
+          if (hascolon) {
             if (sscanf(str, "%d-%d:%d", &start, &end, &stride) != 3)
                  printf("Warning: Check the format of \"%s\".\n", str);
-          else
+          }
+          else {
             if (sscanf(str, "%d-%d", &start, &end) != 2)
                  printf("Warning: Check the format of \"%s\".\n", str);
+          }
       }
       else {
           sscanf(str, "%d", &start);