diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index ada206ba1c..b7f6a601d3 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1748,7 +1748,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) wxString res = wxMacFSSpec2MacFilename( &cwdSpec ) ; strcpy( buf , res ) ; - buf[res.length()-1]=0 ; + buf[res.length()]=0 ; } else buf[0] = 0 ;