diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-04 23:50:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 23:50:57 +0200 |
commit | 69f0847ccc79acabb1cad5b1b54c906973946d81 (patch) | |
tree | f44ee09707eacbe75c8e3ff1be4ad53e0f5080ef /src/nvim/regexp.c | |
parent | 1b70a1da0438018475a73e23015421b2212b34df (diff) | |
parent | ce30998221a53e208a6a68b4b0a3f76db9a5eac3 (diff) | |
download | rneovim-69f0847ccc79acabb1cad5b1b54c906973946d81.tar.gz rneovim-69f0847ccc79acabb1cad5b1b54c906973946d81.tar.bz2 rneovim-69f0847ccc79acabb1cad5b1b54c906973946d81.zip |
Merge #6959 from ZyX-I/pvs-fixes
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 5448cc7131..41070aebf4 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -6928,9 +6928,10 @@ char_u *reg_submatch(int no) STRNCPY(retval + len, reg_getline_submatch(lnum), submatch_mmatch->endpos[no].col); len += submatch_mmatch->endpos[no].col; - if (round == 2) - retval[len] = NUL; - ++len; + if (round == 2) { + retval[len] = NUL; // -V595 + } + len++; } if (retval == NULL) { |