Skip to content

Commit

Permalink
Ignore events with negative relative sample numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Sep 5, 2024
1 parent a753ee6 commit 605f47a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Plugins/LfpViewer/DisplayBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ void DisplayBuffer::addEvent (int eventTime, int eventChannel, int eventId, int
const int samplesLeft = getNumSamples() - index;
const int nSamples = numSourceSamples - eventTime;

if (index < 0)
return;

if (eventId == 1)
{
ttlState |= (1LL << eventChannel);
Expand Down

0 comments on commit 605f47a

Please sign in to comment.