Mercurial > vim
diff src/vim9execute.c @ 23697:19073a768852 v8.2.2390
patch 8.2.2390: Vim9: using positive offset is unexpected
Commit: https://github.com/vim/vim/commit/b3005ce191d27fd2f234df4969d5b58fda9c1940
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 22 17:51:06 2021 +0100
patch 8.2.2390: Vim9: using positive offset is unexpected
Problem: Vim9: using positive offset is unexpected.
Solution: Use int8_T instead of char. (James McCoy)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 22 Jan 2021 18:00:05 +0100 |
parents | e3d77689d356 |
children | 317018f62643 |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -3240,7 +3240,7 @@ call_def_function( { checktype_T *ct = &iptr->isn_arg.type; - tv = STACK_TV_BOT(-(int)ct->ct_off); + tv = STACK_TV_BOT((int)ct->ct_off); SOURCING_LNUM = iptr->isn_lnum; if (check_typval_type(ct->ct_type, tv, ct->ct_arg_idx) == FAIL) @@ -4242,11 +4242,11 @@ ex_disassemble(exarg_T *eap) if (ct->ct_arg_idx == 0) smsg("%4d CHECKTYPE %s stack[%d]", current, type_name(ct->ct_type, &tofree), - -(int)ct->ct_off); + (int)ct->ct_off); else smsg("%4d CHECKTYPE %s stack[%d] arg %d", current, type_name(ct->ct_type, &tofree), - -(int)ct->ct_off, + (int)ct->ct_off, (int)ct->ct_arg_idx); vim_free(tofree); break;