]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
compile fix (still not tested) for GetLastChild()
[wxWidgets.git] / src / msw / filedlg.cpp
index 5b63931fe431ffc30986e0e465c50c91de91b1c8..c596792816ed60ad00fe6bd014b794a442d09df9 100644 (file)
@@ -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';
         }
     }