summaryrefslogtreecommitdiff
path: root/src/fl_shortcut.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-09-21 13:35:40 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-09-21 13:35:40 +0000
commitfdd10af508c8f8f992a1100a70222e94fb8a491f (patch)
treeb2ceed815c4e86ac1c84d568541c996bd67ce395 /src/fl_shortcut.cxx
parent0980e981484a5077b4f63c9fbd08e9f685ff81e1 (diff)
fl_old_shortcut() might read past the end of the shortcut string.
Add comment concerning pointer arithmetic in Fl_Input_::put(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_shortcut.cxx')
-rw-r--r--src/fl_shortcut.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx
index e945f6f24..161c978fd 100644
--- a/src/fl_shortcut.cxx
+++ b/src/fl_shortcut.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.13 2004/04/11 04:39:00 easysw Exp $"
+// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.14 2004/09/21 13:35:40 easysw Exp $"
//
// Shortcut support routines for the Fast Light Tool Kit (FLTK).
//
@@ -176,7 +176,7 @@ int fl_old_shortcut(const char* s) {
if (*s == '#') {n |= FL_ALT; s++;}
if (*s == '+') {n |= FL_SHIFT; s++;}
if (*s == '^') {n |= FL_CTRL; s++;}
- if (s[1]) return n | (int)strtol(s,0,0); // allow 0xf00 to get any key
+ if (*s && s[1]) return n | (int)strtol(s,0,0); // allow 0xf00 to get any key
return n | *s;
}
@@ -201,5 +201,5 @@ int Fl_Widget::test_shortcut() {
}
//
-// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.13 2004/04/11 04:39:00 easysw Exp $".
+// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.14 2004/09/21 13:35:40 easysw Exp $".
//