libmp: fix #6: mptole takes `p` xor `pp`

See commit 0f82a2c3c3 for further info

Also fix build after typo.
This commit is contained in:
Giacomo Tesio 2017-01-18 01:59:39 +01:00
parent 0f82a2c3c3
commit 6e816b293d
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ mptobe(mpint *b, uint8_t *p, uint32_t n, uint8_t **pp)
{
int m;
assert((p == nil) != (pp == nil));
m = (mpsignif(b)+7)/8;
if(m == 0)
m++;

View File

@ -10,7 +10,7 @@ mptole(mpint *b, uint8_t *p, uint32_t n, uint8_t **pp)
{
int m;
assert((p == nil) != (pp == nil))
assert((p == nil) != (pp == nil));
m = (mpsignif(b)+7)/8;
if(m == 0)
m++;