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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user