[Libreoffice-commits] core.git: include/comphelper

Tor Lillqvist tml at collabora.com
Fri Jun 3 08:03:14 UTC 2016


 include/comphelper/windowserrorstring.hxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 4aee1237a59808cbd58c9c02870063d5a7156710
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Jun 3 10:59:57 2016 +0300

    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

diff --git a/include/comphelper/windowserrorstring.hxx b/include/comphelper/windowserrorstring.hxx
index 1da7e9c..d47ff65 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);


More information about the Libreoffice-commits mailing list