We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4887494 commit df3e5d2Copy full SHA for df3e5d2
1 file changed
py/mpz.c
@@ -734,11 +734,9 @@ STATIC void mpz_need_dig(mpz_t *z, mp_uint_t need) {
734
}
735
736
if (z->dig == NULL || z->alloc < need) {
737
- if (z->fixed_dig) {
738
- // cannot reallocate fixed buffers
739
- assert(0);
740
- return;
741
- }
+ // 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);
742
z->dig = m_renew(mpz_dig_t, z->dig, z->alloc, need);
743
z->alloc = need;
744
0 commit comments