tool/NumberListParser.cpp
changeset 2015 ce2fae4d3c4f
parent 2012 ee4782738e30
equal deleted inserted replaced
2011:04fdb4abf120 2015:ce2fae4d3c4f
   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])) {