Skip to content

Commit 7f32070

Browse files
committed
Replace bitwise not with correct not
1 parent 2c5c2fd commit 7f32070

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/luasm.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ function interpreter:label_exists(label)
384384
end
385385

386386
function interpreter:in_bounds(index)
387-
return ~(index < 0 or index > self.data.parsed_lines)
387+
return not (index < 0 or index > self.data.parsed_lines)
388388
end
389389

390390
function interpreter:jump(index)
@@ -400,7 +400,7 @@ function interpreter:jump(index)
400400
error("The index must be a number or a string", 2)
401401
end
402402

403-
if ~self:in_bounds(index) then
403+
if not self:in_bounds(index) then
404404
error("This position does not exist.")
405405
end
406406

0 commit comments

Comments
 (0)