From 1625ce8cb9bad998a13db5a32b3eda1b8ad11b21 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 29 Aug 2017 21:44:19 +0000 Subject: (experiment) See: [https://github.com/libtom/libtommath/pull/75] proposal by sjaeckel --- libtommath/bn_mp_read_radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtommath/bn_mp_read_radix.c b/libtommath/bn_mp_read_radix.c index 11c845c..6ab9401 100644 --- a/libtommath/bn_mp_read_radix.c +++ b/libtommath/bn_mp_read_radix.c @@ -74,7 +74,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) /* if an illegal character was found, fail. */ - if ( *str != '\0' ) { + if (!(*str == '\0' || *str == '\r' || *str == '\n')) { mp_zero( a ); return MP_VAL; } -- cgit v0.12