mhogrefe / malachite

An arbitrary-precision arithmetic library for Rust.
GNU Lesser General Public License v3.0
453 stars 18 forks source link

Natural::from_string_base fail to detect invalid character for long string #20

Closed qingshi163 closed 1 year ago

qingshi163 commented 1 year ago

the following code will fail

    assert_eq!(Natural::from_string_base(16, "1000000000000000z"), None);

but if reduce the length than will success.

    assert_eq!(Natural::from_string_base(16, "10000000z"), None);
mhogrefe commented 1 year ago

Thanks for the catch. The fix will be in the next release.

mhogrefe commented 1 year ago

Fixed in 0.4.0.