Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to add more useful error messages on out-of-bounds data ac… #221

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

keenon
Copy link
Owner

@keenon keenon commented Sep 24, 2024

Attempting to add more useful error messages on out-of-bounds data accesses, to reduce the number of segfaults possible through the Python API

…cesses, to reduce the number of segfaults possible through the Python API
Copy link
Collaborator

@nickbianco nickbianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment, otherwise LGTM.

@@ -720,6 +765,20 @@ s_t SubjectOnDisk::getLowpassCutoffFrequency(int trial, int processingPass)
// that (Butterworth) filter?
int SubjectOnDisk::getLowpassFilterOrder(int trial, int processingPass)
{
if (trial >= getNumTrials())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that trial is non-zero too? Same with the three other if-statements below.

@keenon keenon merged commit d8bd963 into master Sep 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants