Skip to content

Commit cbf5c00

Browse files
authored
fix: odd? on negative numbers works properly (#587)
1 parent 6ebd329 commit cbf5c00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • compiler+runtime/src/cpp/jank/runtime/core

compiler+runtime/src/cpp/jank/runtime/core/math.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ namespace jank::runtime
718718
bool is_odd(object_ref const l)
719719
{
720720
return visit_type<obj::integer>(
721-
[=](auto const typed_l) -> bool { return typed_l->data % 2 == 1; },
721+
[=](auto const typed_l) -> bool { return typed_l->data % 2 != 0; },
722722
l);
723723
}
724724

0 commit comments

Comments
 (0)