mirror of https://github.com/fltk/fltk
Changes brought in at r. 10046 make fluid crash when open or saving files with Fl_Native_File_Chooser
on the WIN32 platform. The filter used by fluid "FLUID files \t*.f[ld]/n" makes Fl_Native_File_Chooser::parse_filter() crash. The present changes TEMPORARILY avoid this crash, but r. 10046 changes should be closely reviewed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10215 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
e64a8e90e3
commit
0f4fa1633d
|
@ -718,11 +718,12 @@ void Fl_Native_File_Chooser::parse_filter(const char *in) {
|
|||
|
||||
// Init
|
||||
int nwildcards = 0;
|
||||
char **wildcards; // parsed wildcards (can be several)
|
||||
//char **wildcards; // parsed wildcards (can be several)
|
||||
char *wildcards[80]; // TMP
|
||||
int maxfilters = (strcnt(in, ",|") + 1); // count wildcard seps
|
||||
int t;
|
||||
wildcards = new char*[maxfilters];
|
||||
for ( t=0; t<maxfilters; t++ ) {
|
||||
//wildcards = new char*[maxfilters];
|
||||
for ( t=0; t<80/*maxfilters*/; t++ ) {
|
||||
wildcards[t] = new char[slen];
|
||||
wildcards[t][0] = '\0';
|
||||
}
|
||||
|
@ -791,8 +792,8 @@ void Fl_Native_File_Chooser::parse_filter(const char *in) {
|
|||
delete[] wildprefix;
|
||||
delete[] comp;
|
||||
delete[] name;
|
||||
for ( t=0; t<maxfilters; t++ ) delete[] wildcards[t];
|
||||
delete[] wildcards;
|
||||
for ( t=0; t<80/*maxfilters*/; t++ ) delete[] wildcards[t];
|
||||
//delete[] wildcards;
|
||||
return;
|
||||
}
|
||||
continue; // not done yet, more filters
|
||||
|
|
Loading…
Reference in New Issue