diff options
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 745e9d27e2..69a371ccf9 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1788,7 +1788,7 @@ void f_getcharstr(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) int i = 0; if (n != 0) { - i += utf_char2bytes((int)n, (char *)temp); + i += utf_char2bytes((int)n, temp); } assert(i < 7); temp[i++] = NUL; @@ -2007,8 +2007,8 @@ static int handle_mapping(int *keylenp, const bool *timedout, int *mapdepth) // Don't allow mapping the first byte(s) of a multi-byte char. // Happens when mapping <M-a> and then changing 'encoding'. // Beware that 0x80 is escaped. - char *p1 = mp->m_keys; - char *p2 = (char *)mb_unescape((const char **)&p1); + const char *p1 = mp->m_keys; + const char *p2 = mb_unescape(&p1); if (p2 != NULL && MB_BYTE2LEN(tb_c1) > utfc_ptr2len(p2)) { mlen = 0; |