aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index 4b77c3a6..2f8aaea1 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 1.9 1997/10/13 22:12:04 roberto Exp roberto $ 2** $Id: lvm.c,v 1.10 1997/10/16 10:59:34 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*/
@@ -79,8 +79,8 @@ int luaV_tostring (TObject *obj)
79void luaV_closure (int nelems) 79void luaV_closure (int nelems)
80{ 80{
81 Closure *c = luaF_newclosure(nelems); 81 Closure *c = luaF_newclosure(nelems);
82 memcpy(c->consts, luaD_stack.top-(nelems+1), (nelems+1)*sizeof(TObject)); 82 c->consts[0] = *(luaD_stack.top-1);
83 c->nelems = nelems; 83 memcpy(&c->consts[1], luaD_stack.top-(nelems+1), nelems*sizeof(TObject));
84 luaD_stack.top -= nelems; 84 luaD_stack.top -= nelems;
85 ttype(luaD_stack.top-1) = LUA_T_FUNCTION; 85 ttype(luaD_stack.top-1) = LUA_T_FUNCTION;
86 (luaD_stack.top-1)->value.cl = c; 86 (luaD_stack.top-1)->value.cl = c;