From 2ff25ee2053c0de0964d7b83a3c0e5b0f172adff Mon Sep 17 00:00:00 2001 From: Patman64 Date: Sun, 4 Jan 2015 22:31:51 -0500 Subject: [PATCH] Fix getting results from event handlers. --- HookMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HookMgr.cpp b/HookMgr.cpp index bbe00c3..0013dab 100644 --- a/HookMgr.cpp +++ b/HookMgr.cpp @@ -159,9 +159,10 @@ int Eluna::CallOneFunction(int number_of_functions, int number_of_arguments, int // Stack: event_id, [arguments], [functions], event_id, [arguments] ExecuteCall(number_of_arguments, number_of_results); + --functions_top; // Stack: event_id, [arguments], [functions - 1], [results] - return functions_top + 1; // Return the location of the first result. + return functions_top + 1; // Return the location of the first result (if any exist). } /*