diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-27 10:20:06 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-12-05 01:46:39 +0100 |
commit | 586dafee2f4824b6cd4e0be80d597fbb810a647e (patch) | |
tree | 1041252b4807c889290e3c92d89bb25df69d7e32 | |
parent | 9d689d639d71ab3d60cb88544619b8cef9510217 (diff) | |
download | rneovim-586dafee2f4824b6cd4e0be80d597fbb810a647e.tar.gz rneovim-586dafee2f4824b6cd4e0be80d597fbb810a647e.tar.bz2 rneovim-586dafee2f4824b6cd4e0be80d597fbb810a647e.zip |
str2specialbuf(): fix comparison
regression by 832c158a663c
-rw-r--r-- | src/nvim/message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index b90c475ede..806de5e116 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1307,7 +1307,7 @@ char *str2special_save(const char *const str, const bool replace_spaces, return (char *)ga.ga_data; } -/// Convert character, replacing key one key code with printable representation +/// Convert character, replacing key with printable representation. /// /// @param[in,out] sp String to convert. Is advanced to the next key code. /// @param[in] replace_spaces Convert spaces into <Space>, normally used for @@ -1392,7 +1392,7 @@ void str2specialbuf(const char *sp, char *buf, size_t len) while (*sp) { const char *s = str2special(&sp, false, false); const size_t s_len = strlen(s); - if (s_len <= len) { + if (len <= s_len) { break; } memcpy(buf, s, s_len); |