From 25ce9e71537c4613236e19fb35feff2683dcbe1e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 30 Apr 2014 10:39:24 -0700 Subject: [PATCH] Fix MSVC build. --- format.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format.cc b/format.cc index 26dab492..7221fc2a 100644 --- a/format.cc +++ b/format.cc @@ -214,7 +214,7 @@ char *fmt::internal::StrError( errno = ERANGE; // The buffer is full so the message is probably truncated. return message; #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) errno = ERANGE; // The buffer is full so the message is probably truncated. return buffer;