aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbutl/timestamp.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbutl/timestamp.cxx b/libbutl/timestamp.cxx
index 41ad282..589c29c 100644
--- a/libbutl/timestamp.cxx
+++ b/libbutl/timestamp.cxx
@@ -252,7 +252,9 @@ strptime (const char* input, const char* format, tm* time)
if (!(ss >> get_time (time, fm.c_str ())))
return nullptr;
- assert (ss.eof ()); // We would fail earlier otherwise.
+ // We would fail earlier otherwise.
+ //
+ assert (ss.eof () || ss.get () == stringstream::traits_type::eof ());
// tellg() behaves as UnformattedInputFunction, so returns failure status if
// eofbit is set.