mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Thu Jan 7 18:00:58 CET 1999 Werner Koch
This commit is contained in:
parent
e3e8d9b92f
commit
7d0efec7cf
31 changed files with 621 additions and 223 deletions
|
@ -48,7 +48,19 @@ __clz_tab[] =
|
|||
#define A_LIMB_1 ((mpi_limb_t)1)
|
||||
|
||||
|
||||
/****************
|
||||
* Sometimes we have MSL (most significant limbs) which are 0;
|
||||
* this is for some reasons not good, so this function removes them.
|
||||
*/
|
||||
void
|
||||
mpi_normalize( MPI a )
|
||||
{
|
||||
if( mpi_is_protected(a) )
|
||||
return;
|
||||
|
||||
for( ; a->nlimbs && !a->d[a->nlimbs-1]; a->nlimbs-- )
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -67,6 +79,7 @@ mpi_get_nbits( MPI a )
|
|||
return n;
|
||||
}
|
||||
|
||||
mpi_normalize( a );
|
||||
if( a->nlimbs ) {
|
||||
mpi_limb_t alimb = a->d[a->nlimbs-1];
|
||||
if( alimb )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue