diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 364e400c01..c36a08b281 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1555,7 +1555,7 @@ void WXDLLEXPORT wxSplitPath(const char *pszFileName, if ( nPosDot > nPosUnix ) { // the file name looks like "path/name.ext" if ( pstrName ) - *pstrName = wxString(pszFileName + nPosUnix + 1, nPosDot - nPosUnix); + *pstrName = wxString(pszFileName + nPosUnix + 1, nPosDot - nPosUnix - 1); if ( pstrExt ) *pstrExt = wxString(pszFileName + nPosDot + 1); }