From 03287d65a49f6aa7e37e462d973f14f71403f470 Mon Sep 17 00:00:00 2001 From: Joe Hauns Date: Wed, 29 Jun 2022 19:10:33 +0100 Subject: [PATCH] fixes issue #6119 (#6120) Co-authored-by: Johannes Schoisswohl --- src/util/mpz.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/mpz.cpp b/src/util/mpz.cpp index bdad1ddfe..736b401b8 100644 --- a/src/util/mpz.cpp +++ b/src/util/mpz.cpp @@ -1842,7 +1842,7 @@ std::string mpz_manager::to_string(mpz const & a) const { template unsigned mpz_manager::hash(mpz const & a) { if (is_small(a)) - return a.m_val; + return ::abs(a.m_val); #ifndef _MP_GMP unsigned sz = size(a); if (sz == 1)