Assume increasing ranges if second number is omitted.
authorFlorian Pose <fp@igh-essen.com>
Tue, 04 Jan 2011 08:36:41 +0100
changeset 2012 ee4782738e30
parent 2010 87de63b19e4c
child 2013 0aea9df5fa21
Assume increasing ranges if second number is omitted.
tool/NumberListParser.cpp
--- a/tool/NumberListParser.cpp	Tue Dec 14 21:58:53 2010 +0100
+++ b/tool/NumberListParser.cpp	Tue Jan 04 08:36:41 2011 +0100
@@ -109,7 +109,8 @@
             case Range:
                 if (i >= size) {
                     int max = maximum();
-                    if (max >= 0) {
+                    // only increasing ranges if second number omitted
+                    if (max >= 0 && firstNum <= (unsigned int) max) {
                         List r = range(firstNum, max);
                         ret.splice(ret.end(), r);
                     }