diff --git a/src/catch2/internal/catch_textflow.cpp b/src/catch2/internal/catch_textflow.cpp index ca0030cfb7..548494b286 100644 --- a/src/catch2/internal/catch_textflow.cpp +++ b/src/catch2/internal/catch_textflow.cpp @@ -109,6 +109,7 @@ namespace Catch { } void AnsiSkippingString::const_iterator::advance() { + assert( m_it != m_string->end() ); m_it++; tryParseAnsiEscapes(); } @@ -150,6 +151,7 @@ namespace Catch { return; } + assert( m_lineStart != current_line.end() ); if ( *m_lineStart == '\n' ) { ++m_parsedTo; } const auto maxLineLength = m_column.m_width - indentSize();