diff --git a/include/lefticus/tools/non_promoting_ints.hpp b/include/lefticus/tools/non_promoting_ints.hpp index 5b07f0d..7e49ead 100644 --- a/include/lefticus/tools/non_promoting_ints.hpp +++ b/include/lefticus/tools/non_promoting_ints.hpp @@ -179,7 +179,7 @@ template struct int_np constexpr int_np &operator%=(const std::integral auto rhs) &noexcept { - value = static_cast(value / rhs); + value = static_cast(value % rhs); return *this; } @@ -226,7 +226,7 @@ template struct int_np constexpr int_np &operator%=(const int_np rhs) &noexcept { - value = static_cast(value / rhs.value); + value = static_cast(value % rhs.value); return *this; }