aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltablib.c')
-rw-r--r--ltablib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltablib.c b/ltablib.c
index 588bf40d..982821ed 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.92 2016/02/08 12:55:19 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.93 2016/02/25 19:41:54 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -113,8 +113,8 @@ static int tremove (lua_State *L) {
113 lua_geti(L, 1, pos + 1); 113 lua_geti(L, 1, pos + 1);
114 lua_seti(L, 1, pos); /* t[pos] = t[pos + 1] */ 114 lua_seti(L, 1, pos); /* t[pos] = t[pos + 1] */
115 } 115 }
116 lua_pushnil(L); 116 lua_pushinteger(L, pos);
117 lua_seti(L, 1, pos); /* t[pos] = nil */ 117 lua_removekey(L, 1); /* remove entry t[pos] */
118 return 1; 118 return 1;
119} 119}
120 120