From e112a86af2313f3570817e894379e5c86f8ec0fe Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 21 Dec 2021 09:58:22 -0600 Subject: [PATCH] triggerbox: fix uninitalized var --- libs/ardour/triggerbox.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 9a684ea59a..f3424ad6ea 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -2336,14 +2336,16 @@ TriggerBox::determine_next_trigger (uint64_t current) * random number and the probability setting) */ - int which_follow_action; + int which_follow_action = 0; int r = _pcg.rand (100); // 0 .. 99 Trigger::FollowAction fa; if (r <= all_triggers[current]->follow_action_probability()) { fa = all_triggers[current]->follow_action (0); + which_follow_action = 0; } else { fa = all_triggers[current]->follow_action (1); + which_follow_action = 1; } /* first switch: deal with the "special" cases where we either do