Skip to content

Commit

Permalink
XXX
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Jan 3, 2025
1 parent 0738beb commit fb1e656
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gmpy2_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ GMPy_MPFR_To_Binary(MPFR_Object *self)
/* Only need to save the precision. */
size += sizesize;
TEMP_ALLOC(buffer, size);
memset(buffer, 0, size);
buffer[0] = 0x04;

/* Set to all 0 since we are special. */
Expand Down Expand Up @@ -510,6 +511,7 @@ GMPy_MPFR_To_Binary(MPFR_Object *self)
/* Now process all actual numbers. */
size += (2 * sizesize) + (sizemant * (mp_bits_per_limb >> 3));
TEMP_ALLOC(buffer, size);
memset(buffer, 0, size);
buffer[0] = 0x04;

/* Set bit 0 to 1 since we are an actual number. */
Expand Down

0 comments on commit fb1e656

Please sign in to comment.