Fixed Windows build
This commit is contained in:
parent
1ccde3f324
commit
d53cc86fb9
@ -91,7 +91,7 @@ namespace fr
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
auto wsa_err_to_str = [](int err) -> std::string {
|
auto wsa_err_to_str = [](int err) -> std::string {
|
||||||
std::string buff(255, '\0');
|
std::string buff(255, '\0');
|
||||||
auto len = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), msgbuf, buff.size(), NULL);
|
auto len = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), &buff[0], buff.size(), NULL);
|
||||||
if(len == 0)
|
if(len == 0)
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
buff.resize(len);
|
buff.resize(len);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user