Skip to content

Conversation

james-a-johnson
Copy link
Contributor

This fixes an error when a constant is being loaded into a flag. The constants associated with a flag value have their size set to zero. That causes the mask for the constant value to be all zeros. Due to that, getting the value of a zero sized constant will always return 0 even if it should be 1.

This commit special cases the size of zero to create a mask of 1 which will correctly mask off the lowest byte and return that as the constant.

This fixes an error when a constant is being loaded into a flag.
The constants associated with a flag value have their size set to zero.
That causes the mask for the constant value to be all zeros. Due to that,
getting the value of a zero sized constant will always return 0 even if
it should be 1.

This commit special cases the size of zero to create a mask of 1 which
will correctly mask off the lowest byte and return that as the constant.
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.

1 participant