Skip to content

Commit

Permalink
Use ~ operator instead of bit32.bxor if Lua version >=5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bakudankun committed Oct 7, 2020
1 parent 07aa84b commit 9bc1a9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoload/rogue/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ g.bxor = nil
local bit_exists, bit = pcall(require, "bit")
if bit_exists then
g.bxor = bit.bxor
elseif _VERSION >= 'Lua 5.3' then
g.bxor = function(x, y)
return x ~ y
end
elseif _VERSION >= 'Lua 5.2' then
g.bxor = bit32.bxor
else
Expand Down

0 comments on commit 9bc1a9a

Please sign in to comment.