Ignore:
Timestamp:
2014-02-13T16:59:06+01:00 (10 years ago)
Author:
Don-vip
Message:

fix #9718 - java.lang.ArithmeticException: / by zero. Closes black hole created somewhere in Brazil :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r6831 r6848  
    830830
    831831        public Nth(PushbackTokenizer tokenizer, boolean modulo) throws ParseError {
    832             this((int) tokenizer.readNumber(tr("Primitive id expected")), modulo);
    833         }
    834 
    835         private Nth(int nth, boolean modulo) {
     832            this((int) tokenizer.readNumber(tr("Positive integer expected")), modulo);
     833        }
     834
     835        private Nth(int nth, boolean modulo) throws ParseError {
     836            if (nth <= 0) {
     837                throw new ParseError(tr("Positive integer expected"));
     838            }
    836839            this.nth = nth;
    837840            this.modulo = modulo;
Note: See TracChangeset for help on using the changeset viewer.