diff options
-rw-r--r-- | ltable.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |