don't be that strict regarding illegal characters in mp_read_radix()

This commit is contained in:
Steffen Jaeckel 2017-08-29 12:02:18 +02:00
parent ba95ef76e0
commit b2971381e5

View File

@ -73,7 +73,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
} }
/* if an illegal character was found, fail. */ /* if an illegal character was found, fail. */
if (*str != '\0') { if (!(*str == '\0' || *str == '\r' || *str == '\n')) {
mp_zero(a); mp_zero(a);
return MP_VAL; return MP_VAL;
} }