diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Errno.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/Errno.cpp b/lib/Support/Errno.cpp index 00be43b..730220f 100644 --- a/lib/Support/Errno.cpp +++ b/lib/Support/Errno.cpp @@ -53,8 +53,10 @@ std::string StrError(int errnum) { str = buffer; # endif #elif HAVE_DECL_STRERROR_S // "Windows Secure API" - if (errnum) + if (errnum) { strerror_s(buffer, MaxErrStrLen - 1, errnum); + str = buffer; + } #elif defined(HAVE_STRERROR) // Copy the thread un-safe result of strerror into // the buffer as fast as possible to minimize impact |