mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 07:26:57 +08:00
Fl_Tabs: fix allocation of tab_width[] (STR #3472).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12925 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// Tab widget for the Fast Light Tool Kit (FLTK).
|
// Tab widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
// Copyright 1998-2016 by Bill Spitzak and others.
|
// Copyright 1998-2018 by Bill Spitzak and others.
|
||||||
//
|
//
|
||||||
// This library is free software. Distribution and use rights are outlined in
|
// This library is free software. Distribution and use rights are outlined in
|
||||||
// the file "COPYING" which should have been included with this file. If this
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
@@ -46,7 +46,7 @@ int Fl_Tabs::tab_positions() {
|
|||||||
clear_tab_positions();
|
clear_tab_positions();
|
||||||
if (nc) {
|
if (nc) {
|
||||||
tab_pos = (int*)malloc((nc+1)*sizeof(int));
|
tab_pos = (int*)malloc((nc+1)*sizeof(int));
|
||||||
tab_width = (int*)malloc((nc+1)*sizeof(int));
|
tab_width = (int*)malloc((nc)*sizeof(int));
|
||||||
}
|
}
|
||||||
tab_count = nc;
|
tab_count = nc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user