mirror of https://github.com/rusefi/lua.git
bug: lastpc was not initialized
This commit is contained in:
parent
5f22f8961c
commit
c39bec81dc
3
lvm.c
3
lvm.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lvm.c,v 1.121 2000/08/08 18:26:05 roberto Exp roberto $
|
** $Id: lvm.c,v 1.122 2000/08/08 20:42:07 roberto Exp roberto $
|
||||||
** Lua virtual machine
|
** Lua virtual machine
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -75,6 +75,7 @@ static void traceexec (lua_State *L, StkId base, StkId top, lua_Hook linehook) {
|
||||||
if (ci->line == 0) { /* first time? */
|
if (ci->line == 0) { /* first time? */
|
||||||
ci->line = 1;
|
ci->line = 1;
|
||||||
ci->refi = 0;
|
ci->refi = 0;
|
||||||
|
ci->lastpc = pc+1; /* make sure it will call linehook */
|
||||||
}
|
}
|
||||||
newline = luaG_getline(lineinfo, pc, ci->line, &ci->refi);
|
newline = luaG_getline(lineinfo, pc, ci->line, &ci->refi);
|
||||||
/* calls linehook when enters a new line or jumps back (loop) */
|
/* calls linehook when enters a new line or jumps back (loop) */
|
||||||
|
|
Loading…
Reference in New Issue