From fa8923e1f99b326603dcd6f753019955f6b95a9b Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 26 Jul 2005 00:07:08 +0000 Subject: If getkeystring() finds a \c escape (when looking for such escapes), truncate the returned string at the escape. --- Src/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index 5f7619c79..19d022c1e 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -3611,7 +3611,9 @@ getkeystring(char *s, int *len, int fromwhere, int *misc) case 'c': if (fromwhere < 2) { *misc = 1; - break; + *t = '\0'; + *len = t - buf; + return buf; } goto def; case 'u': -- cgit v1.2.3