From e923015b0139c3762ad514d703cf965664496660 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 30 Oct 2010 19:28:17 +0000 Subject: STR 2370: fixed static allocation in Fl_Tabs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Tabs.cxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 7aed07486..050c97e73 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -117,12 +117,20 @@ Fl_Widget *Fl_Tabs::which(int event_x, int event_y) { if (event_y > y()+H || event_y < y()) return 0; } if (event_x < x()) return 0; - int p[128], wp[128]; + Fl_Widget *ret = 0L; + int nc = children(); + int *p = (int*)malloc((nc+1)*sizeof(int)); + int *wp = (int*)malloc((nc+1)*sizeof(int)); tab_positions(p, wp); for (int i=0; i