Skip to content

Commit 7cc93c3

Browse files
committed
Fix a couple off-by-one bugs
1 parent 98ce153 commit 7cc93c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayCanvas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ void LfpDisplayCanvas::update()
230230
channelOverlapFactor = options->selectedOverlapValue.getFloatValue();
231231

232232
std::cout << "Checking channels: " << nChans << std::endl;
233-
for (int i = 0; i <= processor->getNumInputs() + 1; i++) // extra channel for events
233+
for (int i = 0; i < processor->getNumInputs() + 1; i++) // extra channel for events
234234
{
235235
//std::cout << i << std::endl;
236236
if (processor->getNumInputs() > 0)
@@ -282,7 +282,7 @@ void LfpDisplayCanvas::update()
282282

283283
std::cout << "Changing channels on LFP display" << std::endl;
284284
if (nChans > 0)
285-
lfpDisplay->setNumChannels(nChans + 1); // add an extra channel for events
285+
lfpDisplay->setNumChannels(nChans);
286286

287287
// update channel names
288288
//std::cout << "Updating channel names" << std::endl;

0 commit comments

Comments
 (0)