mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-27 06:21:02 +00:00
int ->size_t
This commit is contained in:
parent
9e7f8564b6
commit
5e36362a4c
@ -14,8 +14,8 @@ std::string fmt::FormatV(const char *fmt, va_list args)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
std::vector<char> buffptr(length);
|
std::vector<char> buffptr(length);
|
||||||
int printlen = vsnprintf(buffptr.data(), length, fmt, args);
|
size_t printlen = vsnprintf(buffptr.data(), length, fmt, args);
|
||||||
if (printlen >= 0 && printlen < length)
|
if (printlen < length)
|
||||||
{
|
{
|
||||||
str = std::string(buffptr.data(), printlen);
|
str = std::string(buffptr.data(), printlen);
|
||||||
break;
|
break;
|
||||||
|
@ -86,9 +86,9 @@ namespace fmt{
|
|||||||
std::vector<char> buffptr(length);
|
std::vector<char> buffptr(length);
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wformat-security"
|
#pragma clang diagnostic ignored "-Wformat-security"
|
||||||
int printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
size_t printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
if (printlen >= 0 && printlen < length)
|
if (printlen < length)
|
||||||
{
|
{
|
||||||
str = string(buffptr.data(), printlen);
|
str = string(buffptr.data(), printlen);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user