aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index a953bfc9..779245f2 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ 2** $Id: lvm.c,v 2.2 2004/03/16 12:31:40 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*/
@@ -701,12 +701,11 @@ StkId luaV_execute (lua_State *L, int nexeccalls) {
701 } 701 }
702 case OP_SETLIST: 702 case OP_SETLIST:
703 case OP_SETLISTO: { 703 case OP_SETLISTO: {
704 int bc; 704 int bc = GETARG_Bx(i);
705 int n; 705 int n;
706 Table *h; 706 Table *h;
707 runtime_check(L, ttistable(ra)); 707 runtime_check(L, ttistable(ra));
708 h = hvalue(ra); 708 h = hvalue(ra);
709 bc = GETARG_Bx(i);
710 if (GET_OPCODE(i) == OP_SETLIST) 709 if (GET_OPCODE(i) == OP_SETLIST)
711 n = (bc&(LFIELDS_PER_FLUSH-1)) + 1; 710 n = (bc&(LFIELDS_PER_FLUSH-1)) + 1;
712 else { 711 else {
@@ -714,6 +713,8 @@ StkId luaV_execute (lua_State *L, int nexeccalls) {
714 L->top = L->ci->top; 713 L->top = L->ci->top;
715 } 714 }
716 bc &= ~(LFIELDS_PER_FLUSH-1); /* bc = bc - bc%FPF */ 715 bc &= ~(LFIELDS_PER_FLUSH-1); /* bc = bc - bc%FPF */
716 if (bc+n > h->sizearray) /* needs more space? */
717 luaH_resize(L, h, bc+n, h->lsizenode); /* pre-alloc it at once */
717 for (; n > 0; n--) { 718 for (; n > 0; n--) {
718 TValue *val = ra+n; 719 TValue *val = ra+n;
719 setobj2t(L, luaH_setnum(L, h, bc+n), val); 720 setobj2t(L, luaH_setnum(L, h, bc+n), val);