From 18a583306babbd670b871ed11fa170de3f92157d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 29 May 2007 16:05:25 -0300 Subject: [PATCH] patch may be a little simpler --- bugs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bugs b/bugs index 45345a85..adf118d4 100644 --- a/bugs +++ b/bugs @@ -1422,15 +1422,21 @@ since = [[?]], example = [[ ]], patch = [[ lvm.c: -@@ -61,7 +61,7 @@ +@@ -61,11 +61,9 @@ 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) { - if (L->hookcount == 0) { - resethookcount(L); - luaD_callhook(L, LUA_HOOKCOUNT, -1); ++ resethookcount(L); ++ luaD_callhook(L, LUA_HOOKCOUNT, -1); + } + if (mask & LUA_MASKLINE) { + Proto *p = ci_func(L->ci)->l.p; ]], }