tool/NumberListParser.cpp
changeset 2012 ee4782738e30
parent 2010 87de63b19e4c
equal deleted inserted replaced
2010:87de63b19e4c 2012:ee4782738e30
   107                 break;
   107                 break;
   108 
   108 
   109             case Range:
   109             case Range:
   110                 if (i >= size) {
   110                 if (i >= size) {
   111                     int max = maximum();
   111                     int max = maximum();
   112                     if (max >= 0) {
   112                     // only increasing ranges if second number omitted
       
   113                     if (max >= 0 && firstNum <= (unsigned int) max) {
   113                         List r = range(firstNum, max);
   114                         List r = range(firstNum, max);
   114                         ret.splice(ret.end(), r);
   115                         ret.splice(ret.end(), r);
   115                     }
   116                     }
   116                     state = Finished;
   117                     state = Finished;
   117                 } else if (isNumeric(data[i])) {
   118                 } else if (isNumeric(data[i])) {