diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2005-07-26 00:07:08 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2005-07-26 00:07:08 +0000 |
commit | fa8923e1f99b326603dcd6f753019955f6b95a9b (patch) | |
tree | a95afd88ac18cba05066b6233b490ecda7651444 | |
parent | 80bf36e074e7b7c1861b72499cb7d24d2628020c (diff) | |
download | zsh-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.c | 4 |
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': |