diff options
author | Li Jin <dragon-fly@qq.com> | 2021-01-22 17:54:39 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-01-22 17:54:39 +0800 |
commit | 236bcc6e10f59b9336603571f1683cbe4aa411a9 (patch) | |
tree | 7116190d16a12bfcb0819e802c6e1d4ac8b0ec70 /src/lua/ltable.c | |
parent | f61b96675547c8bf40c7f646e3766f4139efd927 (diff) | |
download | yuescript-236bcc6e10f59b9336603571f1683cbe4aa411a9.tar.gz yuescript-236bcc6e10f59b9336603571f1683cbe4aa411a9.tar.bz2 yuescript-236bcc6e10f59b9336603571f1683cbe4aa411a9.zip |
update included Lua.
Diffstat (limited to 'src/lua/ltable.c')
-rw-r--r-- | src/lua/ltable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/ltable.c b/src/lua/ltable.c index e9410f9..e98bab7 100644 --- a/src/lua/ltable.c +++ b/src/lua/ltable.c | |||
@@ -647,6 +647,8 @@ void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) { | |||
647 | else if (unlikely(luai_numisnan(f))) | 647 | else if (unlikely(luai_numisnan(f))) |
648 | luaG_runerror(L, "table index is NaN"); | 648 | luaG_runerror(L, "table index is NaN"); |
649 | } | 649 | } |
650 | if (ttisnil(value)) | ||
651 | return; /* do not insert nil values */ | ||
650 | mp = mainpositionTV(t, key); | 652 | mp = mainpositionTV(t, key); |
651 | if (!isempty(gval(mp)) || isdummy(t)) { /* main position is taken? */ | 653 | if (!isempty(gval(mp)) || isdummy(t)) { /* main position is taken? */ |
652 | Node *othern; | 654 | Node *othern; |