summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2002-08-13 22:43:59 +0000
committerBill Spitzak <spitzak@gmail.com>2002-08-13 22:43:59 +0000
commitab9c8fe152dbd93704043d82cb85f44cfad87745 (patch)
treec0863527aa785b66dc741b1430d61755abb0ae52
parentf0ea022d0ee8bc3d039f3111430b65178d46aea4 (diff)
Typo found by Albrecht Schlo�er fixed. This would crash fltk when a
window is iconized. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2581 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl.cxx8
-rw-r--r--src/Fl_Input_.cxx5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index ffc908cd9..7ff4d5b85 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.41.2.47 2002/08/12 20:48:19 easysw Exp $"
+// "$Id: Fl.cxx,v 1.24.2.41.2.48 2002/08/13 22:43:59 spitzak Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -565,11 +565,11 @@ int Fl::handle(int e, Fl_Window* window)
return 1;
case FL_SHOW:
- wi->show();
+ wi->show(); // this calls Fl_Widget::show(), not Fl_Window::show()
return 1;
case FL_HIDE:
- wi->hide();
+ wi->hide(); // this calls Fl_Widget::hide(), not Fl_Window::hide()
return 1;
case FL_PUSH:
@@ -949,5 +949,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.41.2.47 2002/08/12 20:48:19 easysw Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.41.2.48 2002/08/13 22:43:59 spitzak Exp $".
//
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index c3572a870..1c7034279 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.23 2002/08/13 15:42:44 easysw Exp $"
+// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.24 2002/08/13 22:43:59 spitzak Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -709,6 +709,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
const char* t = Fl::event_text();
const char* e = t+Fl::event_length();
if (input_type() != FL_MULTILINE_INPUT) while (e > t && isspace(*(e-1))) e--;
+ if (!t || e <= t) return 1; // Int/float stuff will crash without this test
if (input_type() == FL_INT_INPUT) {
while (isspace(*t) && t < e) t ++;
const char *p = t;
@@ -850,5 +851,5 @@ Fl_Input_::~Fl_Input_() {
}
//
-// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.23 2002/08/13 15:42:44 easysw Exp $".
+// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.24 2002/08/13 22:43:59 spitzak Exp $".
//