summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/time/time.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index ac2fe5926..7b1ae388b 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -1406,7 +1406,9 @@ char *__XL(strptime)(const char *__restrict buf, const char *__restrict format,
i = 0;
do { /* Store the values into tm. */
- ((int *) tm)[i] = fields[i];
+ if (fields[i] != INT_MIN) {
+ ((int *) tm)[i] = fields[i];
+ }
} while (++i < 8);
return (char *) buf; /* Success. */