mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-06-13 13:27:10 +02:00
Fix bug in plugin caused by not popping the closure from the stack after calling it.
This would've caused the plugin to run out of stack memory eventually.
This commit is contained in:
@@ -146,6 +146,8 @@ private:
|
||||
}
|
||||
// Make the function call and store the result
|
||||
const SQRESULT res = sq_call(vm, mArgc + 1, false, !mQuiet);
|
||||
// Pop the callback object from the stack
|
||||
sq_pop(vm, 1);
|
||||
// Validate the result
|
||||
if (SQ_FAILED(res))
|
||||
{
|
||||
|
||||
@@ -86,6 +86,8 @@ Tasks::Interval Tasks::Task::Execute()
|
||||
}
|
||||
// Make the function call and store the result
|
||||
const SQRESULT res = sq_call(vm, mArgc + 1, false, ErrorHandling::IsEnabled());
|
||||
// Pop the callback object from the stack
|
||||
sq_pop(vm, 1);
|
||||
// Validate the result
|
||||
if (SQ_FAILED(res))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user