+ for( int i = 0; i < maxFilter; i++ ) { // get extension
+ extension = extension + wxStrlen( extension ) +1;
+ }
+
+ extension = wxStrrchr( extension, wxT('.') );
+ if ( extension // != "blabla"
+ && !wxStrrchr( extension, wxT('*') ) // != "blabla.*"
+ && !wxStrrchr( extension, wxT('?') ) // != "blabla.?"
+ && extension[1] // != "blabla."
+ && extension[1] != wxT(' ') ) // != "blabla. "
+ {
+ // now concat extension to the fileName:
+ m_fileName = wxString(fileNameBuffer) + extension;
+
+ int len = wxStrlen( fileNameBuffer );
+ wxStrncpy( fileNameBuffer + len, extension, wxMAXPATH - len );
+ fileNameBuffer[ wxMAXPATH -1 ] = wxT('\0');
+ }