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

BUG: Fix bug on CTF + Windows #10866

Merged
merged 1 commit into from Jun 29, 2022
Merged

BUG: Fix bug on CTF + Windows #10866

merged 1 commit into from Jun 29, 2022

Conversation

larsoner
Copy link
Member

Fix an overflow error that prevents reading large files on Windows. No new test added because we'd need a file > 4 GB and I'm not sure how to mock one.

@larsoner larsoner added this to the 1.1 milestone Jun 29, 2022
@larsoner larsoner merged commit 0452d69 into mne-tools:main Jun 29, 2022
@larsoner larsoner deleted the ctf-win branch June 29, 2022 19:22
Comment on lines +187 to +189
with np.errstate(over='raise'):
pos = np.int64(CTF.HEADER_SIZE)
pos += np.int64(samp_offset) * si['n_chan'] * 4
Copy link
Member

Choose a reason for hiding this comment

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

that turned out to be less painful than I thought it would be

Copy link
Member Author

Choose a reason for hiding this comment

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

... and it would have been even easier / not required a windows machine to debug at all if the native int emitted a warning when it overflowed like numpy does!

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.

None yet

4 participants