Index: time_facet.hpp =================================================================== --- time_facet.hpp +++ time_facet.hpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace boost { namespace date_time { @@ -1172,6 +1173,10 @@ } else { //skip past chars in format and in buffer + if( sitr != stream_end && *itr != *sitr ) { + throw std::exception(); // mismatch in seperater characters found + } + ++itr; // set use_current_char when sitr is already // pointing at the next character to process