Skip to content

getfilesystemtime might cause alignment faults on 64-bit Windows. #86

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

Closed
wants to merge 3 commits into from
Closed

getfilesystemtime might cause alignment faults on 64-bit Windows. #86

wants to merge 3 commits into from

Conversation

slayercat
Copy link
Contributor

http://technet.microsoft.com/en-us/library/ms724284%28v=vs.85%29.aspx

Do not cast a pointer to a FILETIME structure to either a ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows.

time_Info->tv_sec = (int)(ff/(__int64)10000000-(__int64)11644473600);
time_Info->tv_usec = (int)(ff % 10000000)/10;
return 0;
}


Copy link
Contributor

Choose a reason for hiding this comment

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

please refer CODING_STANDARD.

your code need to be cleaned.
This line-break seems useless and there should be space before and after '=' .

after cleanup you could rebase this commit to one commit. a test file needed too.

@slayercat
Copy link
Contributor Author

a new pull request is posted at #89

thanks to laruence and reeze

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