mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +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
|
#else
|
||||||
enum { BUFFER_SIZE = 200 };
|
enum { BUFFER_SIZE = 200 };
|
||||||
char buffer[BUFFER_SIZE];
|
char buffer[BUFFER_SIZE];
|
||||||
EXPECT_EQ(0, strerror_s(buffer, BUFFER_SIZE, error_code));
|
if (strerror_s(buffer, BUFFER_SIZE, error_code))
|
||||||
std::size_t max_len = BUFFER_SIZE - 1;
|
throw std::exception("strerror_s failed");
|
||||||
EXPECT_LT(std::strlen(buffer), max_len);
|
|
||||||
return buffer;
|
return buffer;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user