From d31cda54243fd5c91696eb21e60e84241b9b3397 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 30 Mar 2012 15:45:30 +0200 Subject: 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 Signed-off-by: Lukas Fleischer --- src/keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/keys.c') 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; -- cgit v1.2.3-54-g00ecf