+5
-2
lines changedFilter options
+5
-2
lines changed Original file line number Diff line number Diff line change
@@ -2109,8 +2109,11 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
2109
2109
epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
2110
2110
2111
2111
if (subsecs.count() < 0) {
2112
-
subsecs += std::chrono::seconds(1);
2113
-
val -= std::chrono::seconds(1);
2112
+
auto second = std::chrono::seconds(1);
2113
+
if (epoch.count() < (Duration::min() + second).count())
2114
+
FMT_THROW(format_error("duration is too small"));
2115
+
subsecs += second;
2116
+
val -= second;
2114
2117
}
2115
2118
2116
2119
return formatter<std::tm, Char>::do_format(
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4