diff options
| -rw-r--r-- | CHANGES | 5 | ||||
| -rw-r--r-- | src/Fl_Menu_add.cxx | 7 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 6 |
3 files changed, 10 insertions, 8 deletions
@@ -1,8 +1,9 @@ CHANGES IN FLTK 1.1.0rc3 - Documentation updates. - - Did some testing against Valgrind and fixed some - uninitialized memory problems in Fl_Help_View. + - Did some testing with Valgrind and fixed some memory + problems in Fl_Help_View::Fl_HelpView, + Fl_Menu_::remove(), and Fl_Text_Display::draw_vline(). - Fixed some redraw() bugs, and now redraw portions of the parent widget when the label appears outside the widget. diff --git a/src/Fl_Menu_add.cxx b/src/Fl_Menu_add.cxx index 4e4770463..19c2ce349 100644 --- a/src/Fl_Menu_add.cxx +++ b/src/Fl_Menu_add.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.2 2002/04/11 11:52:41 easysw Exp $" +// "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.3 2002/06/06 14:04:53 easysw Exp $" // // Menu utilities for the Fast Light Tool Kit (FLTK). // @@ -257,9 +257,10 @@ void Fl_Menu_::remove(int i) { for (Fl_Menu_Item* m = item; m < next_item; m++) if (m->text) free((void*)(m->text)); } - memmove(item, next_item, ((menu_+n+1)-next_item)*sizeof(Fl_Menu_Item)); + // MRS: "n" is the menu size(), which includes the trailing NULL entry... + memmove(item, next_item, (menu_+n-next_item)*sizeof(Fl_Menu_Item)); } // -// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.2 2002/04/11 11:52:41 easysw Exp $". +// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.3 2002/06/06 14:04:53 easysw Exp $". // diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 6548c1787..7a493dda9 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.15 2002/05/24 14:19:19 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.16 2002/06/06 14:04:53 easysw Exp $" // // Copyright 2001-2002 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -888,7 +888,7 @@ void Fl_Text_Display::draw_vline(int visLineNum, int leftClip, int rightClip, const char *lineStr; /* If line is not displayed, skip it */ - if ( visLineNum < 0 || visLineNum > mNVisibleLines ) + if ( visLineNum < 0 || visLineNum >= mNVisibleLines ) return; /* Calculate Y coordinate of the string to draw */ @@ -1948,5 +1948,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.15 2002/05/24 14:19:19 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.16 2002/06/06 14:04:53 easysw Exp $". // |
