diff options
| -rw-r--r-- | bugs | 14 |
1 files changed, 10 insertions, 4 deletions
| @@ -1422,15 +1422,21 @@ since = [[?]], | |||
| 1422 | example = [[ ]], | 1422 | example = [[ ]], |
| 1423 | patch = [[ | 1423 | patch = [[ |
| 1424 | lvm.c: | 1424 | lvm.c: |
| 1425 | @@ -61,7 +61,7 @@ | 1425 | @@ -61,11 +61,9 @@ |
| 1426 | lu_byte mask = L->hookmask; | 1426 | lu_byte mask = L->hookmask; |
| 1427 | const Instruction *oldpc = L->savedpc; | 1427 | const Instruction *oldpc = L->savedpc; |
| 1428 | L->savedpc = pc; | 1428 | L->savedpc = pc; |
| 1429 | - if (mask > LUA_MASKLINE) { /* instruction-hook set? */ | 1429 | - if (mask > LUA_MASKLINE) { /* instruction-hook set? */ |
| 1430 | - if (L->hookcount == 0) { | ||
| 1431 | - resethookcount(L); | ||
| 1432 | - luaD_callhook(L, LUA_HOOKCOUNT, -1); | ||
| 1433 | - } | ||
| 1430 | + if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) { | 1434 | + if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) { |
| 1431 | if (L->hookcount == 0) { | 1435 | + resethookcount(L); |
| 1432 | resethookcount(L); | 1436 | + luaD_callhook(L, LUA_HOOKCOUNT, -1); |
| 1433 | luaD_callhook(L, LUA_HOOKCOUNT, -1); | 1437 | } |
| 1438 | if (mask & LUA_MASKLINE) { | ||
| 1439 | Proto *p = ci_func(L->ci)->l.p; | ||
| 1434 | ]], | 1440 | ]], |
| 1435 | } | 1441 | } |
| 1436 | 1442 | ||
