X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=parse-time-string%2Fparse-time-string.c;h=48ec5b0c1843394aac2226bd58f62c7219033665;hb=a9ab5e42af4464e37569221b8faaf5a7fec0cc8e;hp=584067d33d6f1cb61039f1859c5e511b2a57f95e;hpb=d86522637a7cd0455c127284ebccf3645d681441;p=notmuch
diff --git a/parse-time-string/parse-time-string.c b/parse-time-string/parse-time-string.c
index 584067d3..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
*/
@@ -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. */