Skip to content

Commit

Permalink
- fixed #537
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-hart committed Sep 30, 2024
1 parent 127aa59 commit 6c1c41e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hi_tools/hi_tools/MiscToolClasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,9 @@ struct AdditionalEventStorage

std::pair<bool, double> getValue(uint16 eventId, uint8 slotIndex) const
{
if(eventId == 0)
return { false, 0.0 };

auto i1 = eventId & (NumEventSlots -1);
auto i2 = slotIndex & (NumDataSlots - 1);

Expand All @@ -2472,7 +2475,7 @@ struct AdditionalEventStorage
{
auto nv = getValue(eventId, slotIndex);

if(nv.first && nv.second != value)
if(nv.first)
{
value = nv.second;
return true;
Expand Down

0 comments on commit 6c1c41e

Please sign in to comment.