Skip to content

Commit

Permalink
Clamp lshift too, because -1 << 1 is 4294967294, but should be -2
Browse files Browse the repository at this point in the history
  • Loading branch information
flashultra committed Dec 14, 2024
1 parent ffec547 commit 4bbf648
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions std/lua/_lua/_hx_bit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ end
_hx_bit.bor = function(...) return _hx_bit_clamp(_hx_bit_raw.bor(...)) end
_hx_bit.band = function(...) return _hx_bit_clamp(_hx_bit_raw.band(...)) end
_hx_bit.arshift = function(...) return _hx_bit_clamp(_hx_bit_raw.arshift(...)) end
_hx_bit.lshift = function(...) return _hx_bit_clamp(_hx_bit_raw.lshift(...)) end

0 comments on commit 4bbf648

Please sign in to comment.