diff --git a/include/date/date.h b/include/date/date.h index 79a2e9d..f70153b 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -7577,7 +7577,7 @@ from_stream(std::basic_istream& is, const CharT* fmt, } } } - if (neg) + if (neg && !is.fail()) toff = -toff; checked_set(temp_offset, toff, not_a_offset, is); command = nullptr;