aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-08-07 19:59:15 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-08-07 19:59:15 +0800
commitb1fac4270d639d0a80871784edd80cf16c9f8540 (patch)
tree5fad818e786710237a67e86f695310366a9c7cfa
parente89536ca0b0e61111affd6cbacf21105bd637394 (diff)
parenta33726b7db98fcb754c6d9d96538ce21cfc35f9a (diff)
downloaddexon-b1fac4270d639d0a80871784edd80cf16c9f8540.tar
dexon-b1fac4270d639d0a80871784edd80cf16c9f8540.tar.gz
dexon-b1fac4270d639d0a80871784edd80cf16c9f8540.tar.bz2
dexon-b1fac4270d639d0a80871784edd80cf16c9f8540.tar.lz
dexon-b1fac4270d639d0a80871784edd80cf16c9f8540.tar.xz
dexon-b1fac4270d639d0a80871784edd80cf16c9f8540.tar.zst
dexon-b1fac4270d639d0a80871784edd80cf16c9f8540.zip
Merge pull request #1614 from obscuren/web3-finite-fix
web3: regression. Fixes #1613
-rw-r--r--jsre/ethereum_js.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/jsre/ethereum_js.go b/jsre/ethereum_js.go
index 27dbed24c..012e5af70 100644
--- a/jsre/ethereum_js.go
+++ b/jsre/ethereum_js.go
@@ -1137,10 +1137,10 @@ var toHex = function (val) {
if (isString(val)) {
if (val.indexOf('-0x') === 0)
return fromDecimal(val);
- else if (!isFinite(val))
- return fromAscii(val);
else if(val.indexOf('0x') === 0)
return val;
+ else if (!isFinite(val))
+ return fromAscii(val);
}
return fromDecimal(val);