[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Hook event bug
- From: "Andreas Stenius" <andreas.stenius@...>
- Date: Fri, 3 Oct 2003 15:11:50 +0200
Hi,
I've found (and fixed) a small bug in lvm.c
The line
lvm.c:69 > if (mask > LUA_MASKLINE) { /* instruction-hook set? */
in traceexec caused the HOOKCOUNT to be triggered if i.e. both
the LINE and RETURN hooks are set (and count has reached zero) even
though it was not present in the mask.
minimal change to the line:
if (mask >= LUA_MASKCOUNT) { /* instruction-hook set? */
is there a reason why not an exact match is tested, like: if (mask &
LUA_MASKCOUNT) { ... ?
Btw, just want to give my two thumbs up for lua. A great language to work
with!
Cheers,
Andreas