mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
StrFmt: Fix unknow pragma on MSVC
This commit is contained in:
parent
8f84fca0f2
commit
9f51bce2aa
1 changed files with 4 additions and 2 deletions
|
@ -233,12 +233,14 @@ namespace fmt
|
||||||
|
|
||||||
for (std::size_t buf_size = fixed_buf.size();;)
|
for (std::size_t buf_size = fixed_buf.size();;)
|
||||||
{
|
{
|
||||||
|
#ifndef _MSC_VER
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
#pragma GCC diagnostic ignored "-Wformat-security"
|
||||||
|
#endif
|
||||||
const std::size_t len = std::snprintf(buf_addr, buf_size, fmt, do_unveil(args)...);
|
const std::size_t len = std::snprintf(buf_addr, buf_size, fmt, do_unveil(args)...);
|
||||||
|
#ifndef _MSC_VER
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
if (len > INT_MAX)
|
if (len > INT_MAX)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("std::snprintf() failed");
|
throw std::runtime_error("std::snprintf() failed");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue