From c78483992ac7bf3d089718de6274ba3f5ac6f5bb Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 17 Aug 2021 22:18:25 +0300 Subject: Fix assertion in strptime() implementation for VC --- libbutl/timestamp.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- cgit v1.1