fix mp_to_radix
remove an assignment which could overwrite the one with MP_VAL caused by a conflict between 2 recent commits - refactor with goto - return error if output-buffer is too small
This commit is contained in:
parent
c63799c392
commit
642ef5b08f
@ -66,8 +66,6 @@ mp_err mp_to_radix(const mp_int *a, char *str, size_t maxlen, int radix)
|
|||||||
/* append a NULL so the string is properly terminated */
|
/* append a NULL so the string is properly terminated */
|
||||||
*str = '\0';
|
*str = '\0';
|
||||||
|
|
||||||
err = MP_OKAY;
|
|
||||||
|
|
||||||
LBL_ERR:
|
LBL_ERR:
|
||||||
mp_clear(&t);
|
mp_clear(&t);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user