pud: nmealib: _nmea_parse_time not parsing hsec when given "hhmmss" format
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 13 May 2013 07:35:42 +0000 (09:35 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 13 May 2013 07:39:41 +0000 (09:39 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/nmealib/src/parse.c

index 092a703..4153df0 100644 (file)
@@ -48,6 +48,7 @@ static bool _nmea_parse_time(const char *s, const int len, nmeaTIME *t) {
        assert(t);
 
        if (len == (sizeof("hhmmss") - 1)) {
+               t->hsec = 0;
                return (3 == nmea_scanf(s, len, "%2d%2d%2d", &t->hour, &t->min, &t->sec));
        }