summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-12 22:05:14 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-12 22:05:14 +0200
commitffa9684150f5441e84d492e7184ef73587bd6c6c (patch)
treee73aa4b5e0d37ef4d113fcb07f9e1efa5c01d133 /src/mbyte.c
parent83f4cbd973731872b633d6ba0caf850fb708d70c (diff)
downloadvim-git-ffa9684150f5441e84d492e7184ef73587bd6c6c.tar.gz
patch 8.1.0053: first argument of 'completefunc' has inconsistent typev8.1.0053
Problem: The first argument given to 'completefunc' can be Number or String, depending on the value. Solution: Avoid guessing the type of an argument, use typval_T in the callers of call_vim_function(). (Ozaki Kiichi, closes #2993)
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index b79783527..545a40db0 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4795,12 +4795,11 @@ iconv_end(void)
static void
call_imactivatefunc(int active)
{
- char_u *argv[1];
+ typval_T argv[2];
- if (active)
- argv[0] = (char_u *)"1";
- else
- argv[0] = (char_u *)"0";
+ argv[0].v_type = VAR_NUMBER;
+ argv[0].vval.v_number = active ? 1 : 0;
+ argv[1].v_type = VAR_NUMBER;
(void)call_func_retnr(p_imaf, 1, argv, FALSE);
}