mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-27 19:50:31 +00:00
Fix windows build.
This commit is contained in:
parent
f2c9df8e9f
commit
445663fade
@ -44,9 +44,8 @@ std::string get_system_error(int error_code) {
|
||||
#else
|
||||
enum { BUFFER_SIZE = 200 };
|
||||
char buffer[BUFFER_SIZE];
|
||||
EXPECT_EQ(0, strerror_s(buffer, BUFFER_SIZE, error_code));
|
||||
std::size_t max_len = BUFFER_SIZE - 1;
|
||||
EXPECT_LT(std::strlen(buffer), max_len);
|
||||
if (strerror_s(buffer, BUFFER_SIZE, error_code))
|
||||
throw std::exception("strerror_s failed");
|
||||
return buffer;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user