Changeset 18256 in josm for trunk/src


Ignore:
Timestamp:
2021-10-06T22:29:54+02:00 (3 years ago)
Author:
Don-vip
Message:

see #16472 - AIOOBE (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/imagery/CameraPlane.java

    r18255 r18256  
    161161        // Bound check (bounds are essentially the image viewer component)
    162162        if (from.x < 0 || from.y < 0 || to.x < 0 || to.y < 0
    163             || from.x > this.vectors.length || from.y > this.vectors[0].length
    164             || to.x > this.vectors.length || to.y > this.vectors[0].length) {
     163            || from.x > this.vectors.length - 1 || from.y > this.vectors[from.x].length - 1
     164            || to.x > this.vectors.length - 1 || to.y > this.vectors[to.x].length - 1) {
    165165            return;
    166166        }
Note: See TracChangeset for help on using the changeset viewer.