commit | df44a27b53586fccfc6a3aedc89061fdd9a515ff | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Jun 07 20:49:05 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Jun 07 20:49:05 2020 +0200 |
tree | 2d0ca2790b3e106a7d8f059951160789167a17a1 | |
parent | da84ac2a6f467d0b9eddcc8709433cda75d16a41 [diff] [blame] |
patch 8.2.0928: many type casts are used for vim_strnsave() Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes #5633) Remove some type casts.
diff --git a/src/eval.c b/src/eval.c index b184264..6ca3628 100644 --- a/src/eval.c +++ b/src/eval.c
@@ -3139,7 +3139,7 @@ if (n1 >= len || n2 < 0 || n1 > n2) s = NULL; else - s = vim_strnsave(s + n1, (int)(n2 - n1 + 1)); + s = vim_strnsave(s + n1, n2 - n1 + 1); } else {