aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorIhor Antonov <ngortheone@users.noreply.github.com>2019-07-14 15:03:06 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-07-14 21:03:06 +0200
commit47d53d66bdcf1df1688c9af6999156a6c97f5aa7 (patch)
treebf8ef31db32d82b5fe947ec2d2f402cfe855de82 /src/nvim/ops.c
parent37e7e7d56dd93f23945a6aa3f0c803fb32c47c62 (diff)
downloadrneovim-47d53d66bdcf1df1688c9af6999156a6c97f5aa7.tar.gz
rneovim-47d53d66bdcf1df1688c9af6999156a6c97f5aa7.tar.bz2
rneovim-47d53d66bdcf1df1688c9af6999156a6c97f5aa7.zip
PVS/V1028: cast operands, not the result #10508
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index b96e075f66..8dcb78b496 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5490,8 +5490,9 @@ void cursor_pos_info(dict_T *dict)
if (l_VIsual_active) {
if (l_VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL) {
getvcols(curwin, &min_pos, &max_pos, &min_pos.col, &max_pos.col);
- vim_snprintf((char *)buf1, sizeof(buf1), _("%" PRId64 " Cols; "),
- (int64_t)(oparg.end_vcol - oparg.start_vcol + 1));
+ int64_t varargs;
+ STRICT_SUB(oparg.end_vcol, oparg.start_vcol + 1, &varargs ,int64_t);
+ vim_snprintf((char *)buf1, sizeof(buf1), _("%" PRId64 " Cols; "), varargs);
} else {
buf1[0] = NUL;
}