X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a3c54bfa5d912f2d667ae55be215c4d27a5268a..ae901b234c4a0aa7c1777b3bd181dd7f8517ad21:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index b732f23a1c..ca0d92a863 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -384,16 +384,7 @@ void wxStripExtension(wchar_t *buffer) { wxDoStripExtension(buffer); } void wxStripExtension(wxString& buffer) { - //RN: Be careful about the handling the case where - //buffer.length() == 0 - for(size_t i = buffer.length() - 1; i != wxString::npos; --i) - { - if (buffer.GetChar(i) == wxT('.')) - { - buffer = buffer.Left(i); - break; - } - } + buffer = wxFileName::StripExtension(buffer); } // Destructive removal of /./ and /../ stuff