diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-11 01:43:36 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-11 01:43:36 +0300 |
commit | ceb45a08858837319c8ea67b1aaeceaeb24c8510 (patch) | |
tree | 86ed476fe0ea106be41186ad1ed52bb97621fb18 /src/nvim/eval/encode.c | |
parent | fe55f37083b0bef07aa9ac78eb2727c244fdafd3 (diff) | |
download | rneovim-ceb45a08858837319c8ea67b1aaeceaeb24c8510.tar.gz rneovim-ceb45a08858837319c8ea67b1aaeceaeb24c8510.tar.bz2 rneovim-ceb45a08858837319c8ea67b1aaeceaeb24c8510.zip |
*: Fix test failures
Diffstat (limited to 'src/nvim/eval/encode.c')
-rw-r--r-- | src/nvim/eval/encode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 50ddb1f38c..85fd4d1578 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -140,7 +140,9 @@ static int conv_error(const char *const msg, const MPConvStack *const mpstack, ? tv_list_last(v.data.l.list) : TV_LIST_ITEM_PREV(v.data.l.list, v.data.l.li)); - int idx = (int)tv_list_idx_of_item(v.data.l.list, li); + int idx = (li == NULL + ? 0 + : (int)tv_list_idx_of_item(v.data.l.list, li)); if (v.type == kMPConvList || li == NULL || (TV_LIST_ITEM_TV(li)->v_type != VAR_LIST |