@@ -277,7 +277,7 @@ static int vsprintf(_Inout_ std::basic_string<char, _Traits, _Ax> &str, _In_z_ _
|
||||
}
|
||||
size_t offset = str.size();
|
||||
str.resize(offset + count);
|
||||
if (_vsnprintf(&str[offset], count + 1, format, arg) != count)
|
||||
if (_vsnprintf(&str[offset], static_cast<size_t>(count) + 1, format, arg) != count)
|
||||
throw std::runtime_error("failed to format string");
|
||||
return count;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ static int vsprintf(_Inout_ std::basic_string<wchar_t, _Traits, _Ax> &str, _In_z
|
||||
}
|
||||
size_t offset = str.size();
|
||||
str.resize(offset + count);
|
||||
if (_vsnwprintf(&str[offset], count + 1, format, arg) != count)
|
||||
if (_vsnwprintf(&str[offset], static_cast<size_t>(count) + 1, format, arg) != count)
|
||||
throw std::runtime_error("failed to format string");
|
||||
return count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user