Changeset 19325 in josm for trunk/src/org


Ignore:
Timestamp:
2025-02-16T13:21:38+01:00 (4 weeks ago)
Author:
stoecker
Message:

fix #21007, fix failing unit test, patch by StephaneP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/nmea/NmeaParser.java

    r19316 r19325  
    335335                }
    336336            } else {
     337                // Since there is no checksum, we remove any line endings
     338                chkstrings[0] = chkstrings[0].replaceAll("\\r|\\n", "");
    337339                noChecksum++;
    338340            }
     
    444446                }
    445447                // Age of differential correction
    446                 accu = e[GGA.GPS_AGE.position];
    447                 if (!accu.isEmpty() && currentwp != null) {
    448                     currentwp.put(GpxConstants.PT_AGEOFDGPSDATA, Float.valueOf(accu));
     448                if (GGA.GPS_AGE.position < e.length) {
     449                    accu = e[GGA.GPS_AGE.position];
     450                    if (!accu.isEmpty() && currentwp != null) {
     451                        currentwp.put(GpxConstants.PT_AGEOFDGPSDATA, Float.valueOf(accu));
     452                    }
    449453                }
    450454                // reference ID
Note: See TracChangeset for help on using the changeset viewer.