Skip to content

Commit

Permalink
Fix inadequate allocation when retrieving spikes on unit 5. Fixes #121
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Sep 6, 2023
1 parent d60c6d8 commit 27ff390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cbsdk/cbsdk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ cbSdkResult SdkApp::SdkGetTrialData(uint32_t bActive, cbSdkTrialEvent * trialeve
// We don't know for sure how many samples were allocated,
// but this is what the client application was told to allocate.
uint32_t num_allocated = 0;
for (int unit_ix = 0; unit_ix < cbMAXUNITS; unit_ix++)
for (int unit_ix = 0; unit_ix < (cbMAXUNITS + 1); unit_ix++)
{
num_allocated += trialevent->num_samples[ev_ix][unit_ix];
}
Expand Down

0 comments on commit 27ff390

Please sign in to comment.