Revert a bunch of strncmp() conversions
All strncmp() usages were replaced by (evidently) equivalent strcmp()
invocations in commit 2c9499bf27. However,
some of the strncmp() calls were perfectly justified and we actually
broke iCal import and "C-"-style key bindings by converting them to
strcmp(). Fix this by reverting all affected conversions.
Reported-by: Baptiste Jonglez <baptiste@jonglez.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -322,7 +322,7 @@ keys_str2int (char *key)
|
||||
{
|
||||
if (key[0] == '^')
|
||||
return CTRL ((int)key[1]);
|
||||
else if (!strcmp (key, CONTROL_KEY))
|
||||
else if (!strncmp (key, CONTROL_KEY, sizeof (CONTROL_KEY) - 1))
|
||||
return CTRL ((int)key[sizeof (CONTROL_KEY) - 1]);
|
||||
else if (!strcmp (key, TAB_KEY))
|
||||
return TAB;
|
||||
|
||||
Reference in New Issue
Block a user