X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c320b3e32d8da0d3d09983e26efe01eb322b1b53..8a8997c3be3d3795a91ef0d977417b8d2681bb6f:/src/unix/stdpaths.cpp

diff --git a/src/unix/stdpaths.cpp b/src/unix/stdpaths.cpp
index 2cbcb456d3..6aa20c8ad1 100644
--- a/src/unix/stdpaths.cpp
+++ b/src/unix/stdpaths.cpp
@@ -57,9 +57,11 @@ wxString wxStandardPaths::GetInstallPrefix() const
 
 #ifdef __LINUX__
         // under Linux, we can get location of the executable
-        wxString exe;
-        if ( readlink("/proc/self/exe", wxStringBuffer(exe), 1024) != -1 )
+        char buf[4096];
+        if ( readlink("/proc/self/exe", buf, WXSIZEOF(buf)) != -1 )
         {
+            wxString exe(buf, wxConvLibc);
+
             // consider that we're in the last "bin" subdirectory of our prefix
             wxString basename(wxString(wxTheApp->argv[0]).AfterLast(_T('/')));
             size_t pos = exe.find(_T("/bin/") + basename);