summaryrefslogtreecommitdiff
path: root/lib/lua/src/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lua/src/lvm.c')
-rw-r--r--lib/lua/src/lvm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/lua/src/lvm.c b/lib/lua/src/lvm.c
index 52f65e6..532e75d 100644
--- a/lib/lua/src/lvm.c
+++ b/lib/lua/src/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 1.11 2007-07-27 10:05:54 pixel Exp $
+** $Id: lvm.c,v 1.12 2008-02-17 00:35:20 pixel Exp $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -61,11 +61,9 @@ static void traceexec (lua_State *L, const Instruction *pc) {
lu_byte mask = L->hookmask;
const Instruction *oldpc = L->savedpc;
L->savedpc = pc;
- if (mask > LUA_MASKLINE) { /* instruction-hook set? */
- if (L->hookcount == 0) {
- resethookcount(L);
- luaD_callhook(L, LUA_HOOKCOUNT, -1);
- }
+ if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) {
+ resethookcount(L);
+ luaD_callhook(L, LUA_HOOKCOUNT, -1);
}
if (mask & LUA_MASKLINE) {
Proto *p = ci_func(L->ci)->l.p;