From 981097a4a32356a7eb0e8c6862cb034ca574b4da Mon Sep 17 00:00:00 2001 From: clemahieu Date: Fri, 10 Feb 2017 19:53:39 -0600 Subject: [PATCH] Newer boosts stop parsing the stream instead of throwing an exception when unknown characters are found. --- rai/utility.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rai/utility.cpp b/rai/utility.cpp index 51a1a0e0..f5f4be32 100644 --- a/rai/utility.cpp +++ b/rai/utility.cpp @@ -238,6 +238,10 @@ bool rai::uint128_union::decode_hex (std::string const & text) { stream >> number_l; *this = number_l; + if (!stream.eof ()) + { + result = true; + } } catch (std::runtime_error &) { @@ -415,6 +419,10 @@ bool rai::uint256_union::decode_hex (std::string const & text) { stream >> number_l; *this = number_l; + if (!stream.eof ()) + { + result = true; + } } catch (std::runtime_error &) { @@ -712,6 +720,10 @@ bool rai::uint512_union::decode_hex (std::string const & text) { stream >> number_l; *this = number_l; + if (!stream.eof ()) + { + result = true; + } } catch (std::runtime_error &) {