
When parameters a and c to mp_add_d are the same pointer, c->sign was being set to zero/positive and then a->sign was being checked. Set the c->sign at end as it will always be zero/positive through the code and the sign of the result isn't otherwise used.