aboutsummaryrefslogtreecommitdiffstats
path: root/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-06-16 15:13:28 +0000
committerWerner Koch <[email protected]>1998-06-16 15:13:28 +0000
commite6ac5acbbf56ed8995bfa4d5a28160fa3a5d825f (patch)
tree6ff27595e33dd57d3a8979d245236bd5f404c9b4 /mpi/mpi-bit.c
parentextensions are now working and fixed a lot of bugs (diff)
downloadgnupg-e6ac5acbbf56ed8995bfa4d5a28160fa3a5d825f.tar.gz
gnupg-e6ac5acbbf56ed8995bfa4d5a28160fa3a5d825f.zip
some more internall structure changes
Diffstat (limited to 'mpi/mpi-bit.c')
-rw-r--r--mpi/mpi-bit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mpi/mpi-bit.c b/mpi/mpi-bit.c
index d74abbf6d..2e420875b 100644
--- a/mpi/mpi-bit.c
+++ b/mpi/mpi-bit.c
@@ -60,6 +60,13 @@ mpi_get_nbits( MPI a )
{
unsigned n;
+ if( mpi_is_protected(a) ) {
+ n = mpi_get_nbit_info(a);
+ if( !n )
+ n = a->nlimbs * BITS_PER_MPI_LIMB;
+ return n;
+ }
+
if( a->nlimbs ) {
mpi_limb_t alimb = a->d[a->nlimbs-1];
if( alimb )