about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2005-07-26 00:07:08 +0000
committerWayne Davison <wayned@users.sourceforge.net>2005-07-26 00:07:08 +0000
commitfa8923e1f99b326603dcd6f753019955f6b95a9b (patch)
treea95afd88ac18cba05066b6233b490ecda7651444
parent80bf36e074e7b7c1861b72499cb7d24d2628020c (diff)
downloadzsh-fa8923e1f99b326603dcd6f753019955f6b95a9b.tar.gz
zsh-fa8923e1f99b326603dcd6f753019955f6b95a9b.tar.xz
zsh-fa8923e1f99b326603dcd6f753019955f6b95a9b.zip
If getkeystring() finds a \c escape (when looking for such escapes),
truncate the returned string at the escape.
-rw-r--r--Src/utils.c4
1 files changed, 3 insertions, 1 deletions
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':