1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00

parse_time: set tm_sec to zero before conditional second parsing

This fixes test 9 (Basic VMS responses) that uses time specs with
seconds left out (e.g. 17:44) for me.
This commit is contained in:
Jonas Fonseca 2008-02-27 12:24:58 +01:00
parent 9be36ed129
commit 397bef882b

View File

@ -128,6 +128,7 @@ parse_time(const unsigned char **time, struct tm *tm, unsigned char *end)
tm->tm_hour = (h1 - '0') * 10 + h2 - '0';
tm->tm_min = (m1 - '0') * 10 + m2 - '0';
tm->tm_sec = 0;
/* Eat :SS or [PA]M or nothing */
if (end && date + 2 >= end) {