aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-08-17 22:18:25 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-08-17 22:44:40 +0300
commitc78483992ac7bf3d089718de6274ba3f5ac6f5bb (patch)
tree0d4846603be67e4f248fe3d699d7845e6d2f2fe9
parent6b3c83ce50e92068f428f284fbdf86c4328a1bd3 (diff)
Fix assertion in strptime() implementation for VC
-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.