commit | 9a4a5ac4defa98424d7de14d16f49f1b126af4c7 | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Wed Dec 04 18:05:29 2013 +0100 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Thu Dec 05 15:58:38 2013 +0100 |
tree | b2185881ce0d270ee8cda6de317757837964c3ef | |
parent | a0179b8c4af3a0022503fc344e6009e82c5d1716 [diff] |
Fix bug in mpi_set_bit
diff --git a/library/bignum.c b/library/bignum.c index 945da17..98d534a 100644 --- a/library/bignum.c +++ b/library/bignum.c
@@ -280,7 +280,8 @@ MPI_CHK( mpi_grow( X, off + 1 ) ); } - X->p[off] = ( X->p[off] & ~( 0x01 << idx ) ) | ( val << idx ); + X->p[off] &= ~( (t_uint) 0x01 << idx ); + X->p[off] |= (t_uint) val << idx; cleanup: