Skip to content

Commit

Permalink
Fix integer ratio subtraction bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jianlingzhong committed Dec 5, 2024
1 parent f841955 commit 49539de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler+runtime/src/cpp/jank/runtime/obj/ratio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ namespace jank::runtime
obj::ratio_ptr operator-(native_integer const l, obj::ratio_data const &r)
{
return make_box<obj::ratio>(
obj::ratio_data(l * r.denominator - r.denominator, r.denominator));
obj::ratio_data(l * r.denominator - r.numerator, r.denominator));
}

object_ptr operator*(obj::ratio_data const &l, obj::ratio_data const &r)
Expand Down

0 comments on commit 49539de

Please sign in to comment.