diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp index 0581ac88..a5f8946e 100644 --- a/include/internal/catch_session.cpp +++ b/include/internal/catch_session.cpp @@ -277,7 +277,7 @@ namespace Catch { // Note that on unices only the lower 8 bits are usually used, clamping // the return value to 255 prevents false negative when some multiple // of 256 tests has failed - return (std::min)( { MaxExitCode, totals.error, static_cast( totals.assertions.failed ) } ); + return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast(totals.assertions.failed))); } catch( std::exception& ex ) { Catch::cerr() << ex.what() << std::endl;