[Libreoffice-commits] core.git: Branch 'aoo/trunk' - desktop/win32

Herbert Dürr hdu at apache.org
Thu Jun 19 09:08:14 PDT 2014


 desktop/win32/source/unoinfo.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c20e4c606988de65d45ce3ce9608cb75deb5234a
Author: Herbert Dürr <hdu at apache.org>
Date:   Thu Jun 19 14:42:27 2014 +0000

    #i125115# fix unoinfo output on Windows
    
    by using plain fwrite instead of trusting fprintf to handle the wchar_t string

diff --git a/desktop/win32/source/unoinfo.cxx b/desktop/win32/source/unoinfo.cxx
index dbf34cf..dfb538d 100644
--- a/desktop/win32/source/unoinfo.cxx
+++ b/desktop/win32/source/unoinfo.cxx
@@ -66,7 +66,8 @@ void writePath(
     if (end == NULL) {
         exit(EXIT_FAILURE);
     }
-    fprintf(stdout, "%S", path);
+    size_t nWideLen = wcslen(path);
+    fwrite( path, sizeof(wchar_t), nWideLen, stdout);
 }
 
 }
@@ -103,7 +104,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
         writeNull();
         writePath(path, pathEnd, MY_STRING(L"classes\\unoil.jar"));
         writeNull();
-        writePath(path, pathEnd, MY_STRING(L"\classes\\ridl.jar"));
+        writePath(path, pathEnd, MY_STRING(L"classes\\ridl.jar"));
         writeNull();
         writePath(path, pathEnd, MY_STRING(L"classes\\jurt.jar"));
         writeNull();


More information about the Libreoffice-commits mailing list