Skip to content

Commit

Permalink
fix crash on too many mseg points
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Feb 28, 2024
1 parent 522d0ff commit e19fd06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/gin_dsp/dsp/gin_mseg.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MSEG
{
juce::Array<Point> points;
int numPoints = 0;
int maxPoints = 50;
int maxPoints = 200;
int startIndex = 0;
int endIndex = 2;

Expand Down
2 changes: 1 addition & 1 deletion modules/gin_plugin/components/gin_msegcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ void MSEGComponent::addPoint (float t, float v)
}
data.numPoints++;
}
else
else if (data.numPoints < data.maxPoints)
{
if (t >= data.points[data.numPoints - 1].time)
{
Expand Down

0 comments on commit e19fd06

Please sign in to comment.