From: robertlipe Date: Thu, 18 Jul 2013 03:10:00 +0000 (+0000) Subject: Avoid implicit time_t conversion in waypt_add that would result X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~505 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=569c38cdb708c3c56787c1cfcd18a3e01c691e11;p=gpsbabel.git Avoid implicit time_t conversion in waypt_add that would result in creation_time being zeroed. --- diff --git a/gpsbabel/waypt.cc b/gpsbabel/waypt.cc index 176965ab0..dbb7ea686 100644 --- a/gpsbabel/waypt.cc +++ b/gpsbabel/waypt.cc @@ -158,7 +158,7 @@ waypt_add(waypoint *wpt) if ((wpt->longitude < -180) || (wpt->longitude > 180.0)) fatal("Invalid longitude %f in waypoint %s.\n", lon_orig, wpt->shortname ? wpt->shortname : ""); - if (wpt->creation_time < 0) { + if (!wpt->creation_time.isValid()) { warning("%s: Invalid timestamp in waypoint %s.\n", wpt->session->name, wpt->shortname ? wpt->shortname : "");