summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/date/lib/parse_iso_intervals.c2
-rw-r--r--ext/date/lib/parse_iso_intervals.re2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c
index 94dddaa136..07c5b76384 100644
--- a/ext/date/lib/parse_iso_intervals.c
+++ b/ext/date/lib/parse_iso_intervals.c
@@ -415,7 +415,7 @@ yy6:
break;
}
ptr++;
- } while (*ptr);
+ } while (!s->errors->error_count && *ptr);
s->have_period = 1;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re
index 56aa34d8e0..c5e9f677ba 100644
--- a/ext/date/lib/parse_iso_intervals.re
+++ b/ext/date/lib/parse_iso_intervals.re
@@ -383,7 +383,7 @@ isoweek = year4 "-"? "W" weekofyear;
break;
}
ptr++;
- } while (*ptr);
+ } while (!s->errors->error_count && *ptr);
s->have_period = 1;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;