iconv() doesn't set the trailing zero
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1522,15 +1522,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
||||
|
||||
wxString wxGetCwd()
|
||||
{
|
||||
wxString str;
|
||||
|
||||
// we can't create wxStringBuffer object inline: Sun CC generates buggy
|
||||
// code in this case!
|
||||
{
|
||||
wxStringBuffer buf(str, _MAXPATHLEN);
|
||||
wxGetWorkingDirectory(buf, _MAXPATHLEN);
|
||||
}
|
||||
|
||||
wxChar *buffer = new wxChar[_MAXPATHLEN];
|
||||
wxGetWorkingDirectory(buffer, _MAXPATHLEN);
|
||||
wxString str( buffer );
|
||||
delete [] buffer;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user