mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
- Allow R and A to point to same mpi in mpi_div_mpi
This commit is contained in:
parent
36c4a678a6
commit
f02c5642d0
3 changed files with 8 additions and 6 deletions
|
|
@ -1195,9 +1195,9 @@ int mpi_div_mpi( mpi *Q, mpi *R, const mpi *A, const mpi *B )
|
|||
if( R != NULL )
|
||||
{
|
||||
mpi_shift_r( &X, k );
|
||||
X.s = A->s;
|
||||
mpi_copy( R, &X );
|
||||
|
||||
R->s = A->s;
|
||||
if( mpi_cmp_int( R, 0 ) == 0 )
|
||||
R->s = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue