X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba681060f36767a2682b8547871af2c6f8159955..2165ad93a2fc73d74d933570e095191281b9045f:/src/msw/filedlg.cpp diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 5b63931fe4..c596792816 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -107,6 +107,7 @@ wxString wxFileSelector(const char *title, 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 ) { filterFind = filterIndex; break; @@ -250,10 +251,13 @@ int wxFileDialog::ShowModal(void) 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'; } }