From: robertlipe Date: Wed, 17 Jul 2013 01:38:35 +0000 (+0000) Subject: Round fractional time when reading XML beyond milliseoconds. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~515 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d6d127cdb3c25d4f202380aeecbeb624e3bd7117;p=gpsbabel.git Round fractional time when reading XML beyond milliseoconds. --- diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index eda1ff374..166d1280b 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -22,6 +22,7 @@ #include "defs.h" #include "cet_util.h" #include "garmin_fs.h" +#include #if HAVE_LIBEXPAT #include static XML_Parser psr; @@ -903,7 +904,7 @@ xml_parse_time(const char* cdatastr) // Fractional part of time. if (fsec) { - time = time.addMSecs(fsec * 1000); + time = time.addMSecs(lround(fsec * 1000)); } // Any offsets that were stuck at the end.