aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 831d3e34..09d72f18 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -240,8 +240,9 @@ LUALIB_API int luaL_ref (lua_State *L, int t) {
240 } 240 }
241 else { /* no free elements */ 241 else { /* no free elements */
242 ref = lua_getn(L, t) + 1; /* use next `n' */ 242 ref = lua_getn(L, t) + 1; /* use next `n' */
243 lua_pushliteral(L, "n");
243 lua_pushnumber(L, ref); 244 lua_pushnumber(L, ref);
244 lua_setstr(L, t, "n"); /* n = n+1 */ 245 lua_rawset(L, t); /* n = n+1 */
245 } 246 }
246 lua_rawseti(L, t, ref); 247 lua_rawseti(L, t, ref);
247 return ref; 248 return ref;