X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=parse-time-string%2Fparse-time-string.c;h=48ec5b0c1843394aac2226bd58f62c7219033665;hp=ccad422b3c8db96462257d3df30660c63f0ee2bb;hb=518843747835903b77889da30ce8c4518a5c0574;hpb=8c6b2e7e9d30bb3a9ef4fd8632cbf6d8d0673bb7 diff --git a/parse-time-string/parse-time-string.c b/parse-time-string/parse-time-string.c index ccad422b..48ec5b0c 100644 --- a/parse-time-string/parse-time-string.c +++ b/parse-time-string/parse-time-string.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Author: Jani Nikula */ @@ -1081,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. */