mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Use snprintf instead of sprintf (#2111)
This commit is contained in:
parent
5b1a6ae00a
commit
21c97f2fad
@ -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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user