py/mpz: Use assert to verify mpz does not have a fixed digit buffer.
diff --git a/py/mpz.c b/py/mpz.c
index b5ec171..6415e1d 100644
--- a/py/mpz.c
+++ b/py/mpz.c
@@ -734,11 +734,9 @@
}
if (z->dig == NULL || z->alloc < need) {
- if (z->fixed_dig) {
- // cannot reallocate fixed buffers
- assert(0);
- return;
- }
+ // if z has fixed digit buffer there's not much we can do as the caller will
+ // be expecting a buffer with at least "need" bytes (but it shouldn't happen)
+ assert(!z->fixed_dig);
z->dig = m_renew(mpz_dig_t, z->dig, z->alloc, need);
z->alloc = need;
}