diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-09-30 23:03:48 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-09-30 23:03:48 -0400 |
commit | 8a14268ab97e0245a014282c8bb1ccfdf17d014e (patch) | |
tree | fc40abc08e13259a729b220518fe51958e2fd5dd /src/nvim/message.c | |
parent | afe7ba1e71f0fe43817ae9abac56c721c99f95c6 (diff) | |
parent | 01fc01e5d6d170715c5f00dab767f857ecec7c21 (diff) | |
download | rneovim-8a14268ab97e0245a014282c8bb1ccfdf17d014e.tar.gz rneovim-8a14268ab97e0245a014282c8bb1ccfdf17d014e.tar.bz2 rneovim-8a14268ab97e0245a014282c8bb1ccfdf17d014e.zip |
Merge pull request #1141 from splinterofchaos/system-nl
vim-patch:7.4.247 + vim-patch:7.4.248 + vim-patch:7.4.256 + f_system() bug fix
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r-- | src/nvim/message.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index ef0faa35ee..58dbee8cf9 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -3173,8 +3173,7 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs) p = ""; while (*p != NUL) { if (*p != '%') { - char *q = strchr(p + 1, '%'); - size_t n = (q == NULL) ? STRLEN(p) : (size_t)(q - p); + size_t n = xstrchrnul(p + 1, '%') - p; /* Copy up to the next '%' or NUL without any changes. */ if (str_l < str_m) { |