diff --git a/CHANGES b/CHANGES index c9a2da32f..a055d5cc9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ CHANGES IN FLTK 1.3.0 + - Fixed static allocation in Fl_Tabs (STR #2370) + - Fixed Fl_Widget::measure_label() to const (STR #2406) + - Added step by step README's for MSWindows, OS X, and four + Linux distros - Fixed unbalanced Windows OleInitialize/OleUnitialize calls when loading/unloading the FLTK dll (STR #2417) - Fixed X11/XDBE double buffering (STR #2152, #2197) 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