1
0
Fork 0
forked from lthn/blockchain

added return value check(coverity STREAM_FORMAT_STATE)

This commit is contained in:
cryptozoidberg 2019-11-11 02:04:49 +01:00
parent 2cde1c530d
commit cf7dc36cf7
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC

View file

@ -61,8 +61,10 @@ namespace epee
t_pod_type transform_str_to_t_pod(const std::string& a)
{
t_pod_type res = AUTO_VAL_INIT(res);
epee::string_tools::hex_to_pod(a, res);
if (!epee::string_tools::hex_to_pod(a, res))
throw std::runtime_error(std::string("Unable to transform \"") + a + "\" to pod type " + typeid(t_pod_type).name());
return res;
CHECK_AND_ASSERT_THROW_MES
}
//basic helpers for blob-to-hex serialization