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

windows: incorrect split between high and low for position and offset #5

Closed
dimichgh opened this issue May 10, 2016 · 3 comments
Closed

Comments

@dimichgh
Copy link

https://github.com/ozra/mmap-io/blob/master/src/mman.h#L52-L53
Should this be as below?

const DWORD dwEndLow = (sizeof(size_t) > sizeof(DWORD)) ? DWORD(end & 0x0000FFFFL) : DWORD(end);
const DWORD dwEndHigh = (sizeof(size_t) > sizeof(DWORD)) ? DWORD(end>>16) : DWORD(0);

For offset:
https://github.com/ozra/mmap-io/blob/master/src/mman.h#L54-L55

const DWORD dwOffsetLow = (sizeof(size_t) > sizeof(DWORD)) ? DWORD(offset & 0x0000FFFFL) : DWORD(offset);
const DWORD dwOffsetHigh = (sizeof(size_t) > sizeof(DWORD)) ? DWORD(offset>>16) : DWORD(0);
@ozra
Copy link
Owner

ozra commented May 10, 2016

@toxicwolf - any ideas? Or @dimichgh - take a stab at it :-). PR's are welcome.

@jamsch0
Copy link
Contributor

jamsch0 commented May 10, 2016 via email

@ozra
Copy link
Owner

ozra commented Mar 5, 2018

Fixed via bkmartinjr

@ozra ozra closed this as completed Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants