Skip to content

Commit

Permalink
Fix uninitialised variable for Peaks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hemmer committed Apr 21, 2022
1 parent 9739c02 commit 6ce2443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions peaks/modulations/multistage_envelope.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down

0 comments on commit 6ce2443

Please sign in to comment.