diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/actions.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2002-08-31 Shawn Betts <sabetts@vcn.bc.ca> + + * src/actions.c (cmd_bind): malloc the correct amount of memory for keydesc + (cmd_unbind): likewise + 2002-07-28 Shawn Betts <sabetts@vcn.bc.ca> * src/main.c (handler): do not report badwindow errors if diff --git a/src/actions.c b/src/actions.c index 875c235..4fcd0e4 100644 --- a/src/actions.c +++ b/src/actions.c @@ -452,7 +452,7 @@ cmd_bind (int interactive, void *data) return NULL; } - keydesc = (char*) xmalloc (strlen (data + 1)); + keydesc = (char*) xmalloc (strlen (data) + 1); sscanf (data, "%s", keydesc); cmd = data + strlen (keydesc); @@ -506,7 +506,7 @@ cmd_unbind (int interactive, void *data) return NULL; } - keydesc = (char*) xmalloc (strlen (data + 1)); + keydesc = (char*) xmalloc (strlen (data) + 1); sscanf (data, "%s", keydesc); key = parse_keydesc (keydesc); |