summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-08-29 21:44:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-08-29 21:44:19 (GMT)
commit1625ce8cb9bad998a13db5a32b3eda1b8ad11b21 (patch)
treefe946f0ced3c1fed8be84b1a589c5e8d96ce8733
parent032ab0fd5ca666fb1e3cbbbb31e69cef956f9a9b (diff)
downloadtcl-libtommath_tcl_fixes_75.zip
tcl-libtommath_tcl_fixes_75.tar.gz
tcl-libtommath_tcl_fixes_75.tar.bz2
(experiment) See: [https://github.com/libtom/libtommath/pull/75] proposal by sjaeckellibtommath_tcl_fixes_75
-rw-r--r--libtommath/bn_mp_read_radix.c2
1 files changed, 1 insertions, 1 deletions
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;
}