X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=parse-time-string%2Fparse-time-string.c;h=1cef47d4b0bd85faafe8fdd1cff5ad368d56459c;hp=584067d33d6f1cb61039f1859c5e511b2a57f95e;hb=6aeef2ee15d16a0376f5bad8309a1da99fb73004;hpb=d86522637a7cd0455c127284ebccf3645d681441 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. */