mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Bugfix
This commit is contained in:
parent
5e14310071
commit
e551e2bc5d
12 changed files with 107 additions and 37 deletions
|
@ -248,7 +248,7 @@ namespace fmt
|
|||
// pointer to the current buffer
|
||||
char* buf_addr = fixed_buf.data();
|
||||
|
||||
for (std::size_t buf_size = fixed_buf.size();; buf_size *= 2, buf.reset(buf_addr = new char[buf_size]))
|
||||
for (std::size_t buf_size = fixed_buf.size();; buf.reset(buf_addr = new char[buf_size]))
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
||||
|
@ -256,10 +256,17 @@ namespace fmt
|
|||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if (len > INT_MAX)
|
||||
{
|
||||
throw std::runtime_error("std::snprintf() failed");
|
||||
}
|
||||
|
||||
if (len <= buf_size)
|
||||
{
|
||||
return{ buf_addr, len };
|
||||
}
|
||||
|
||||
buf_size = len;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,11 +292,6 @@ namespace fmt
|
|||
std::memcpy(message.get(), other, size + 1);
|
||||
}
|
||||
|
||||
exception(exception&& other)
|
||||
{
|
||||
message = std::move(other.message);
|
||||
}
|
||||
|
||||
operator const char*() const
|
||||
{
|
||||
return message.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue