diff options
| author | cat_mint | 2020-12-01 09:59:27 -0800 |
|---|---|---|
| committer | GitHub | 2020-12-01 18:59:27 +0100 |
| commit | 21c97f2fad9ab9c979b7d1065253bbb4b172b6dc (patch) | |
| tree | 54701ea475a0071f110d21e2498a08a21d980cc7 /src/catch2 | |
| parent | 5b1a6ae00ad66f9c99573cde9e38a4560d89e416 (diff) | |
| download | catch3-21c97f2fad9ab9c979b7d1065253bbb4b172b6dc.tar.gz | |
Use snprintf instead of sprintf (#2111)
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/reporters/catch_reporter_combined_tu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/reporters/catch_reporter_combined_tu.cpp b/src/catch2/reporters/catch_reporter_combined_tu.cpp index d6adc60e..d9e94aa9 100644 --- a/src/catch2/reporters/catch_reporter_combined_tu.cpp +++ b/src/catch2/reporters/catch_reporter_combined_tu.cpp @@ -44,7 +44,7 @@ namespace Catch { #ifdef _MSC_VER sprintf_s( buffer, "%.3f", duration ); #else - std::sprintf( buffer, "%.3f", duration ); + std::snprintf( buffer, maxDoubleSize, "%.3f", duration ); #endif return std::string( buffer ); } |