diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-01-26 20:47:04 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-01-26 20:47:04 +0100 |
| commit | 21ea89cd1268e89b91cfaaf6b34b9a82ffe7eee9 (patch) | |
| tree | 7a1a7fb20734f7edfbb86609f55bdf764da7dceb | |
| parent | 51215ab66c736a543663103e779df4e5dbc6b11c (diff) | |
| download | cgeo-21ea89cd1268e89b91cfaaf6b34b9a82ffe7eee9.zip cgeo-21ea89cd1268e89b91cfaaf6b34b9a82ffe7eee9.tar.gz cgeo-21ea89cd1268e89b91cfaaf6b34b9a82ffe7eee9.tar.bz2 | |
fix #2430: waypoints not loaded from website
A recent fix for #2341 broke the fresh store of waypoints. Comparing
with "< 0" to check if a waypoint id is invalid implies setting the
uninitialized value to a negative number.
| -rw-r--r-- | main/src/cgeo/geocaching/Waypoint.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/Waypoint.java b/main/src/cgeo/geocaching/Waypoint.java index 7a8b787..5b1ecab 100644 --- a/main/src/cgeo/geocaching/Waypoint.java +++ b/main/src/cgeo/geocaching/Waypoint.java @@ -14,7 +14,7 @@ public class Waypoint implements IWaypoint, Comparable<Waypoint> { public static final String PREFIX_OWN = "OWN"; private static final int ORDER_UNDEFINED = -2; - private int id = 0; + private int id = -1; private String geocode = "geocode"; private WaypointType waypointType = WaypointType.WAYPOINT; private String prefix = ""; @@ -46,7 +46,7 @@ public class Waypoint implements IWaypoint, Comparable<Waypoint> { public Waypoint(final Waypoint other) { merge(other); this.waypointType = other.waypointType; - id = 0; + id = -1; } public void setIcon(final Resources res, final TextView nameView) { |
