From 02123776f208502aecd374a324472720e5e3352f Mon Sep 17 00:00:00 2001 From: Thomas Gamper Date: Sun, 21 Aug 2022 17:44:03 +0200 Subject: [PATCH] fixes catchorg/Catch2#2401 --- include/internal/catch_session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();