aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-09 11:49:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-09 11:49:41 -0300
commitc39bec81dcacc5a7c206289cea2bc596ea124943 (patch)
tree41fafd54ce3d61c0d3e588f69d32bbc2ae1b8417
parent5f22f8961c80ce36297f086ae31d87bbb6897c97 (diff)
downloadlua-c39bec81dcacc5a7c206289cea2bc596ea124943.tar.gz
lua-c39bec81dcacc5a7c206289cea2bc596ea124943.tar.bz2
lua-c39bec81dcacc5a7c206289cea2bc596ea124943.zip
bug: lastpc was not initialized
-rw-r--r--lvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lvm.c b/lvm.c
index 1a7629de..3895c14a 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 1.121 2000/08/08 18:26:05 roberto Exp roberto $ 2** $Id: lvm.c,v 1.122 2000/08/08 20:42:07 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*/
@@ -75,6 +75,7 @@ static void traceexec (lua_State *L, StkId base, StkId top, lua_Hook linehook) {
75 if (ci->line == 0) { /* first time? */ 75 if (ci->line == 0) { /* first time? */
76 ci->line = 1; 76 ci->line = 1;
77 ci->refi = 0; 77 ci->refi = 0;
78 ci->lastpc = pc+1; /* make sure it will call linehook */
78 } 79 }
79 newline = luaG_getline(lineinfo, pc, ci->line, &ci->refi); 80 newline = luaG_getline(lineinfo, pc, ci->line, &ci->refi);
80 /* calls linehook when enters a new line or jumps back (loop) */ 81 /* calls linehook when enters a new line or jumps back (loop) */