don't look beyond the end of the string if it ends with a backslash in FilterInEntryName() (thanks Purify)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-01-20 00:55:17 +00:00
parent c616c2e834
commit d9f5d54a5a

View File

@@ -2030,8 +2030,11 @@ static wxString FilterInEntryName(const wxString& str)
strResult.Alloc(str.Len());
for ( const wxChar *pc = str.c_str(); *pc != '\0'; pc++ ) {
if ( *pc == wxT('\\') )
pc++;
if ( *pc == wxT('\\') ) {
// we need to test it here or we'd skip past the NUL in the loop line
if ( *++pc == _T('\0') )
break;
}
strResult += *pc;
}