Ignore:
Timestamp:
2019-05-15T22:41:37+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #17691 - fix issue where SimilarNamedWay crashes on a subset of names (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java

    r15007 r15079  
    245245            for (int i = 0; i < words.length; i++) {
    246246                String word = words[i];
    247                 part = name.substring(start, start + word.length());
     247                if (start + word.length() <= name.length()) {
     248                    part = name.substring(start, start + word.length());
     249                }
    248250                if (word.equalsIgnoreCase(part)) {
    249251                    break;
Note: See TracChangeset for help on using the changeset viewer.