Merge pull request #2463 from arkpar/az-fix

Allow 0x prefix for address entry in AZ
This commit is contained in:
Gav Wood 2015-07-14 17:44:28 +02:00
commit ac98dbfa76

View File

@ -479,7 +479,7 @@ bytes importCode(json_spirit::mObject& _o)
{
bytes code;
if (_o["code"].type() == json_spirit::str_type)
if (_o["code"].get_str().find_first_of("0x") != 0)
if (_o["code"].get_str().find("0x") != 0)
code = compileLLL(_o["code"].get_str(), false);
else
code = fromHex(_o["code"].get_str().substr(2));