serialization: fix bad rapidjson api usage

This commit is contained in:
moneromooo-monero 2020-05-18 14:16:38 +00:00
parent 77a008f714
commit 5ed37ba83c
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -120,7 +120,7 @@ void read_hex(const rapidjson::Value& val, epee::span<std::uint8_t> dest)
throw WRONG_TYPE("string");
}
if (!epee::from_hex::to_buffer(dest, {val.GetString(), val.Size()}))
if (!epee::from_hex::to_buffer(dest, {val.GetString(), val.GetStringLength()}))
{
throw BAD_INPUT();
}