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

Digilent Discovery3 fails on msys2 #800

Closed
ledvinap opened this issue Sep 19, 2023 · 2 comments
Closed

Digilent Discovery3 fails on msys2 #800

ledvinap opened this issue Sep 19, 2023 · 2 comments

Comments

@ledvinap
Copy link
Contributor

On windows (including msys2 mingw64), sizeof(int)==sizeof(long)==4.
stol will then overflow when parsing periods larger than 2us (< 500Kkz).
https://github.com/glscopeclient/scopehal/blob/master/scopehal/DigilentOscilloscope.cpp#L456C10-L456C10

Replacing stol with stoll fixes windows build, but is a bit of overkill on normal systems (128 bits)

@bvernoux
Copy link
Contributor

Yes just replace it with std::stoll() it returns a 64bits (long long) on any 64bits computer and not 128bits
You can push a PR for that

@ledvinap
Copy link
Contributor Author

#802

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

No branches or pull requests

2 participants