summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_MAC.mm
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-09-04 13:50:31 +0000
committerManolo Gouy <Manolo>2011-09-04 13:50:31 +0000
commitbb9dd96ad355a8430da7fd43d8ec8d7af2a0312e (patch)
tree5c2589c8ae3b011b093dd961423db5bf3bf835d2 /src/Fl_Native_File_Chooser_MAC.mm
parent7d8c00cc09b7ea3e5f4e024120311df506feead6 (diff)
Fixed Mac OS crash when using Fl_Native_File_Chooser with filter that does not end with \n.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9029 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Native_File_Chooser_MAC.mm')
-rw-r--r--src/Fl_Native_File_Chooser_MAC.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm
index f22dc35e6..4140dc2ec 100644
--- a/src/Fl_Native_File_Chooser_MAC.mm
+++ b/src/Fl_Native_File_Chooser_MAC.mm
@@ -399,7 +399,7 @@ static char *prepareMacFilter(int count, const char *filter, char **patterns) {
}
rank++;
*(q++) = '\n';
- if (*p) p = r + 1;
+ if (*r) p = r + 1; else p = r;
} while(*p);
*q = 0;
return t;