Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mikelr
Copy link
Contributor

@mikelr mikelr commented Nov 24, 2021

boolVal is only 16-bits wide in the C structure, but we are reading it
here as a 64-bit integer. The upper bits are not necessarily
initialized. This can lead to "true" being returned incorrectly when the
actual value is "false".

Fix the issse by masking off the upper bits before the comparison.

boolVal is only 16-bits wide in the C structure, but we are reading it
here as a 64-bit integer. The upper bits are not necessarily
initialized. This can lead to "true" being returned incorrectly when the
actual value is "false".

Fix the issse by masking off the upper bits before the comparison.
@mattn
Copy link
Member

mattn commented Nov 24, 2021

Good catch. Thank you.

@mattn mattn merged commit 6a613ff into go-ole:master Nov 24, 2021
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