From e1d0d57f12db929507ec0217b5c4315673b565c5 Mon Sep 17 00:00:00 2001 From: William Blanke Date: Wed, 9 Oct 2024 20:55:28 -0700 Subject: [PATCH] tovec --- src/integer_common.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }