Commit cbbd067
committed
Fix calculation of mask for constant values
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.1 parent 98f9bae commit cbbd067
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1754 | 1754 | | |
1755 | 1755 | | |
1756 | 1756 | | |
1757 | | - | |
1758 | | - | |
1759 | | - | |
1760 | | - | |
1761 | | - | |
1762 | | - | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1763 | 1765 | | |
1764 | 1766 | | |
1765 | 1767 | | |
| |||
0 commit comments