summaryrefslogtreecommitdiff
path: root/src/keys.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-03-30 15:45:30 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-03-30 15:50:27 +0200
commitd31cda54243fd5c91696eb21e60e84241b9b3397 (patch)
tree4fa8bf199987e8a0e3e2ea46695ad64351b6ef91 /src/keys.c
parentf3ccc70e379269a67c7278856af5365bdcc20f7d (diff)
downloadcalcurse-d31cda54243fd5c91696eb21e60e84241b9b3397.zip
Revert a bunch of strncmp() conversions
All strncmp() usages were replaced by (evidently) equivalent strcmp() invocations in commit 2c9499bf272e06a62902711c6c20621ef3f80e64. 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>
Diffstat (limited to 'src/keys.c')
-rw-r--r--src/keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keys.c b/src/keys.c
index 533626b..c41a0b3 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -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;