made IsPathSeparator(NUL) work (by returning false)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1277,10 +1277,8 @@ wxString wxFileName::GetPathTerminators(wxPathFormat format)
|
|||||||
bool wxFileName::IsPathSeparator(wxChar ch, wxPathFormat format)
|
bool wxFileName::IsPathSeparator(wxChar ch, wxPathFormat format)
|
||||||
{
|
{
|
||||||
// wxString::Find() doesn't work as expected with NUL - it will always find
|
// wxString::Find() doesn't work as expected with NUL - it will always find
|
||||||
// it, so it is almost surely a bug if this function is called with NUL arg
|
// it, so test for it separately
|
||||||
wxASSERT_MSG( ch != _T('\0'), _T("shouldn't be called with NUL") );
|
return ch != _T('\0') && GetPathSeparators(format).Find(ch) != wxNOT_FOUND;
|
||||||
|
|
||||||
return GetPathSeparators(format).Find(ch) != wxNOT_FOUND;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user