diff --git a/src/integer_common.h b/src/integer_common.h index d4a5186..6d45546 100644 --- a/src/integer_common.h +++ b/src/integer_common.h @@ -196,7 +196,10 @@ struct integer { size_t count; mpz_export(res.data(), &count, -1, 8, 0, 0, impl); - //res.resize(count); + if (count == 0) + count = 1; + + res.resize(count); return res; }