diff --git a/include/date/date.h b/include/date/date.h index 5af9dd2..5974fc4 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -6997,7 +6997,7 @@ from_stream(std::basic_istream& is, const CharT* fmt, goto broken; } if (Y < static_cast(year::min()) || Y > static_cast(year::max())) - goto broken; + Y = not_a_year; auto ymd = year{Y}/m/d; if (wd != not_a_weekday && ymd.ok()) {