mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix toHex() in case of empty data and non-empty prefix
This commit is contained in:
parent
6b5f83cdfa
commit
4fd55ae397
@ -53,9 +53,6 @@ string solidity::util::toHex(uint8_t _data, HexCase _case)
|
||||
|
||||
string solidity::util::toHex(bytes const& _data, HexPrefix _prefix, HexCase _case)
|
||||
{
|
||||
if (_data.empty())
|
||||
return {};
|
||||
|
||||
std::string ret(_data.size() * 2 + (_prefix == HexPrefix::Add ? 2 : 0), 0);
|
||||
|
||||
size_t i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user