if( i-is-1 > 0 && is+1 < filter2.Len() )
{
-// if( filter2.Mid(is+1,i-is-1).Contains(defaultExtension) )
- if( filter2.Mid(is+1,i-is-1) == defaultExtension )
+ if( filter2.Mid(is+1,i-is-1).Contains(defaultExtension) )
+// if( filter2.Mid(is+1,i-is-1) == defaultExtension )
{
filterFind = filterIndex;
break;
*/
//=======================================================================
- wxString theFilter = ( Strlen(m_wildCard) == 0 ) ? wxString("*.*") : m_wildCard;
+ wxString theFilter;
+ if ( Strlen(m_wildCard) == 0 )
+ theFilter = wxString("*.*");
+ else
+ theFilter = m_wildCard ;
wxString filterBuffer;
if ( !strchr( theFilter, '|' ) ) { // only one filter ==> default text
else { // more then one filter
filterBuffer = theFilter;
- for ( unsigned int i = 0; i < filterBuffer.Len(); i++ ) {
- if ( filterBuffer.GetChar(i) == '|' ) {
- filterBuffer[i] = '\0';
- }
+ }
+
+ filterBuffer += "|";
+ // Replace | with \0
+ for ( unsigned int i = 0; i < filterBuffer.Len(); i++ ) {
+ if ( filterBuffer.GetChar(i) == '|' ) {
+ filterBuffer[i] = '\0';
}
}