diff --git a/src/tl/tl/tlLongInt.h b/src/tl/tl/tlLongInt.h index 8068d79cb..7a56bd927 100644 --- a/src/tl/tl/tlLongInt.h +++ b/src/tl/tl/tlLongInt.h @@ -1046,10 +1046,10 @@ public: } else if (is_neg () && d.is_neg ()) { std::pair, long_uint > res = (-*this).long_uint::divmod (-d); // The definition of the modulo sign is consistent with int arithmetics - return std::make_pair (res.first, -long_int (res.second)); + return std::make_pair (long_int (res.first), -long_int (res.second)); } else { std::pair, long_uint > res = long_uint::divmod (d); - return std::make_pair (res.first, res.second); + return std::make_pair (long_int (res.first), long_int (res.second)); } }