From ab6103d984e547d11986d6f4d03f5e0e70504eca Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 12 Jun 2019 13:46:48 +0100 Subject: [PATCH] Don't run next(1) when we register calc function, clear outputs instead (otherwise we read into arbitary memory). Resolves #25 hopefully --- include/FluidSCWrapper.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index 56b32f3..4bed7f7 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -117,8 +117,8 @@ public: for (int i = 0; i < static_cast(mClient.controlChannelsOut()); ++i) { mOutputs.emplace_back(nullptr, 0, 0); } - - set_calc_function(); + mCalcFunc = make_calc_function(); +// set_calc_function(); Wrapper::getInterfaceTable()->fClearUnitOutputs(this, 1);