aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index 0d14f23a..6265a603 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.168 2013/05/02 12:31:26 roberto Exp roberto $ 2** $Id: lvm.c,v 2.169 2013/05/06 17:17:09 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -292,11 +292,11 @@ void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {
292 Table *h = hvalue(rb); 292 Table *h = hvalue(rb);
293 tm = fasttm(L, h->metatable, TM_LEN); 293 tm = fasttm(L, h->metatable, TM_LEN);
294 if (tm) break; /* metamethod? break switch to call it */ 294 if (tm) break; /* metamethod? break switch to call it */
295 setnvalue(ra, cast_num(luaH_getn(h))); /* else primitive len */ 295 setivalue(ra, luaH_getn(h)); /* else primitive len */
296 return; 296 return;
297 } 297 }
298 case LUA_TSTRING: { 298 case LUA_TSTRING: {
299 setnvalue(ra, cast_num(tsvalue(rb)->len)); 299 setivalue(ra, tsvalue(rb)->len);
300 return; 300 return;
301 } 301 }
302 default: { /* try metamethod */ 302 default: { /* try metamethod */