From: Christian Heller Date: Tue, 25 Mar 2014 15:00:18 +0000 (+0100) Subject: In client: Fix FIXME in get_keyname_to_keycode(). X-Git-Tag: tce~809 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/static/gitweb.js?a=commitdiff_plain;h=1c17f47249e2248ead55594b3164b1be5831ac7d;p=plomrogue In client: Fix FIXME in get_keyname_to_keycode(). --- diff --git a/TODO b/TODO index ceea7b4..7586040 100644 --- a/TODO +++ b/TODO @@ -29,5 +29,3 @@ CLIENT: - make log scrollable - re-organize code: empty misc.h into proper modules, split up windows.h - -- simplify get_keyname_to_keycode() diff --git a/src/client/keybindings.c b/src/client/keybindings.c index b23a47e..29e6c05 100644 --- a/src/client/keybindings.c +++ b/src/client/keybindings.c @@ -84,7 +84,7 @@ extern struct Command * get_command_to_keycode(struct KeyBindingDB * kbdb, extern char * get_keyname_to_keycode(uint16_t keycode) { char * f_name = "get_name_to_keycode()"; - char * keyname = try_malloc(15, f_name); /* FIXME: Why 15? */ + char * keyname = try_malloc(10, f_name); /* max keyname length + 1 */ if (32 < keycode && keycode < 127) { sprintf(keyname, "%c", keycode);