From bb9dd96ad355a8430da7fd43d8ec8d7af2a0312e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 4 Sep 2011 13:50:31 +0000 Subject: [PATCH] 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 --- src/Fl_Native_File_Chooser_MAC.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;