diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp index 6254c584..6247fa7d 100644 --- a/include/internal/catch_session.cpp +++ b/include/internal/catch_session.cpp @@ -293,7 +293,7 @@ namespace Catch { // Handle list request if( Option listed = list( m_config ) ) - return static_cast( *listed ); + return (std::min) (MaxExitCode, static_cast(*listed)); TestGroup tests { m_config }; auto const totals = tests.execute();