From e4b03a6551b0bd22347e095ea0d6cc6b2b6e0687 Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Sat, 12 May 2018 13:26:29 +0100 Subject: [PATCH] Make HookedLineInto/OutFunction symmetric Call HookedLineIntoFunction before RecursionDepth is incremented, so the value of RecursionDepth is the same when calling both HookedLineIntoFunction and HookedLineOutFunction for the same function call. --- src/funcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/funcs.c b/src/funcs.c index b791b5d97dc..bcab25b2b16 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -415,8 +415,8 @@ Obj STEVES_TRACING; #endif #define CHECK_RECURSION_BEFORE \ - CheckRecursionBefore(); \ - HookedLineIntoFunction(func); + HookedLineIntoFunction(func); \ + CheckRecursionBefore(); #define CHECK_RECURSION_AFTER \ DecRecursionDepth(); \