X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13b1f8a7e69e4003623bef16c680c33da427ef59..bd1a676876fd11876afa661e0d0270912c9fc1bb:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 2539acd9ab..1c498fa3b0 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1474,7 +1474,13 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) wxString wxGetCwd() { wxString str; - wxGetWorkingDirectory(wxStringBuffer(str, _MAXPATHLEN), _MAXPATHLEN); + + // we can't create wxStringBuffer object inline: Sun CC generates buggy + // code in this case! + { + wxStringBuffer buf(str, _MAXPATHLEN); + wxGetWorkingDirectory(buf, _MAXPATHLEN); + } return str; }