Commit a33726b7 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

web3: regression. Fixes #1613

parent ac10c935
...@@ -1137,10 +1137,10 @@ var toHex = function (val) { ...@@ -1137,10 +1137,10 @@ var toHex = function (val) {
if (isString(val)) { if (isString(val)) {
if (val.indexOf('-0x') === 0) if (val.indexOf('-0x') === 0)
return fromDecimal(val); return fromDecimal(val);
else if (!isFinite(val))
return fromAscii(val);
else if(val.indexOf('0x') === 0) else if(val.indexOf('0x') === 0)
return val; return val;
else if (!isFinite(val))
return fromAscii(val);
} }
return fromDecimal(val); return fromDecimal(val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment