diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-25 12:05:40 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-25 12:05:40 +0200 |
commit | f62654a6859998f9d63eb22702c572d5ebcff15c (patch) | |
tree | fd38985a6a7f94658c157da9a6f470d718f34eed /win/inspircd_win32wrapper.cpp | |
parent | 9c285d9546ea5b99a5ae1ac5186206308ca2d38f (diff) | |
parent | 2cc3d7ecb8cd77341215db5bb94cebf917a5c5ef (diff) |
Merge insp20
Diffstat (limited to 'win/inspircd_win32wrapper.cpp')
-rw-r--r-- | win/inspircd_win32wrapper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index eba18dca3..3a3b5917a 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -206,6 +206,11 @@ CWin32Exception::CWin32Exception() : exception() dwErrorCode = GetLastError(); if( FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)szErrorString, _countof(szErrorString), NULL) == 0 ) sprintf_s(szErrorString, _countof(szErrorString), "Error code: %u", dwErrorCode); + for (size_t i = 0; i < _countof(szErrorString); i++) + { + if ((szErrorString[i] == '\r') || (szErrorString[i] == '\n')) + szErrorString[i] = 0; + } } CWin32Exception::CWin32Exception(const CWin32Exception& other) |