eval,lua/converter: Fix problems spotted in review

This commit is contained in:
ZyX
2017-12-31 00:50:31 +03:00
parent b6ee90a243
commit c55cf5f4c1
2 changed files with 33 additions and 29 deletions

View File

@@ -213,7 +213,6 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv)
if (cur.special) {
list_T *const kv_pair = tv_list_alloc();
tv_list_append_list(cur.tv->vval.v_list, kv_pair);
typval_T s_tv = decode_string(s, len, kTrue, false, false);
if (s_tv.v_type == VAR_UNKNOWN) {
ret = false;
@@ -227,6 +226,7 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv)
.v_type = VAR_UNKNOWN,
});
kv_push(stack, cur);
tv_list_append_list(cur.tv->vval.v_list, kv_pair);
cur = (TVPopStackItem) {
.tv = TV_LIST_ITEM_TV(tv_list_last(kv_pair)),
.container = false,