X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/d86522637a7cd0455c127284ebccf3645d681441..8285f9b145573d1a1e6cbdb424a176b5593cdd2d:/parse-time-string/parse-time-string.c diff --git a/parse-time-string/parse-time-string.c b/parse-time-string/parse-time-string.c index 584067d3..1cef47d4 100644 --- a/parse-time-string/parse-time-string.c +++ b/parse-time-string/parse-time-string.c @@ -32,6 +32,7 @@ #include #include +#include "compat.h" #include "parse-time-string.h" /* @@ -1080,10 +1081,10 @@ parse_time (struct state *state, char sep, return set_user_tz (state, state->delim, v1, v2); } - if (!is_valid_time (v1, v2, v3)) + if (!is_valid_time (v1, v2, n3 ? v3 : 0)) return -PARSE_TIME_ERR_INVALIDTIME; - return set_abs_time (state, v1, v2, n3 ? v3 : 0); + return set_abs_time (state, v1, v2, n3 ? (int) v3 : UNSET); } /* strtoul helper that assigns length. */