Fix MSVC build.

This commit is contained in:
Victor Zverovich 2014-04-30 10:39:24 -07:00
parent f79398699b
commit 25ce9e7153

View File

@ -214,7 +214,7 @@ char *fmt::internal::StrError(
errno = ERANGE; // The buffer is full so the message is probably truncated. errno = ERANGE; // The buffer is full so the message is probably truncated.
return message; return message;
#elif _WIN32 #elif _WIN32
errno = strerror_s(buffer, buflen, error_code); errno = strerror_s(buffer, buffer_size, error_code);
if (errno == 0 && std::strlen(buffer) == buffer_size - 1) if (errno == 0 && std::strlen(buffer) == buffer_size - 1)
errno = ERANGE; // The buffer is full so the message is probably truncated. errno = ERANGE; // The buffer is full so the message is probably truncated.
return buffer; return buffer;