From 6ce2443166a34412d974bc9a17326b8ac4454352 Mon Sep 17 00:00:00 2001 From: Ewan <915048+hemmer@users.noreply.github.com> Date: Thu, 21 Apr 2022 17:20:23 +0100 Subject: [PATCH] Fix uninitialised variable for Peaks shape_ is uninitialised, and causes crashes on the windows build of VCV Peaks analysis here: https://community.vcvrack.com/t/peaks-clone/9414/59?u=hemmer --- peaks/modulations/multistage_envelope.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peaks/modulations/multistage_envelope.h b/peaks/modulations/multistage_envelope.h index 5b1487a5..7ff894ad 100644 --- a/peaks/modulations/multistage_envelope.h +++ b/peaks/modulations/multistage_envelope.h @@ -293,9 +293,9 @@ class MultistageEnvelope { } private: - int16_t level_[kMaxNumSegments]; - uint16_t time_[kMaxNumSegments]; - EnvelopeShape shape_[kMaxNumSegments]; + int16_t level_[kMaxNumSegments] = {}; + uint16_t time_[kMaxNumSegments] = {}; + EnvelopeShape shape_[kMaxNumSegments] = {}; int16_t segment_; int16_t start_value_;