diff --git a/date.h b/date.h index abd7646..46b9751 100644 --- a/date.h +++ b/date.h @@ -5334,7 +5334,10 @@ read_long_double(std::basic_istream& is, unsigned m = 1, unsigned break; } if (count < m) + { is.setstate(std::ios::failbit); + return 0; + } return std::stold(buf); }