Skip to content

Commit

Permalink
Fixes a LuaJIT stack leak on broken generate function error return (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoun authored Dec 13, 2024
1 parent fe778c0 commit 9df9f5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/common/dsp/WavetableScriptEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ struct LuaWTEvaluator::Details
if (storage)
storage->reportError("Unable to locate generate function",
"Wavetable Script Evaluator");
lua_pop(L, 1); // pop the generate non-function
return std::nullopt;
}
Surge::LuaSupport::setSurgeFunctionEnvironment(L);
Expand Down

0 comments on commit 9df9f5f

Please sign in to comment.