summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-06-03 10:59:57 +0300
committerTor Lillqvist <tml@collabora.com>2016-06-03 11:00:40 +0300
commit4aee1237a59808cbd58c9c02870063d5a7156710 (patch)
tree5d4bbd8c9bafb3a474dba95249fcd2edad9313dc /include/comphelper
parent210c39dd9a6ebaa964c03c20e4b442ea36941ae9 (diff)
Strip also a CR if there (and there seems to be such)
Sad that it took so long for me to notice. Change-Id: I14b8a61930bb0b2dd1c5e9cce2a6c3e375dcb6ed
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/windowserrorstring.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/comphelper/windowserrorstring.hxx b/include/comphelper/windowserrorstring.hxx
index 1da7e9c90630..d47ff659eb44 100644
--- a/include/comphelper/windowserrorstring.hxx
+++ b/include/comphelper/windowserrorstring.hxx
@@ -32,6 +32,9 @@ inline OUString WindowsErrorString(DWORD nErrorCode)
if (pMsgBuf[wcslen(pMsgBuf)-1] == '\n')
pMsgBuf[wcslen(pMsgBuf)-1] = '\0';
+ if (pMsgBuf[wcslen(pMsgBuf)-1] == '\r')
+ pMsgBuf[wcslen(pMsgBuf)-1] = '\0';
+
OUString result(pMsgBuf);
LocalFree(pMsgBuf);