aboutsummaryrefslogtreecommitdiffstats
path: root/lib/web3.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-13 19:49:10 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-13 19:49:10 +0800
commit380d9862c399602045886fb05ee628539675383c (patch)
treeba7e65e00ba1b963863497695c15029e5af2e995 /lib/web3.js
parent9e0de57a821c245224dba96621d6d75feb7784d7 (diff)
downloadgo-tangerine-380d9862c399602045886fb05ee628539675383c.tar
go-tangerine-380d9862c399602045886fb05ee628539675383c.tar.gz
go-tangerine-380d9862c399602045886fb05ee628539675383c.tar.bz2
go-tangerine-380d9862c399602045886fb05ee628539675383c.tar.lz
go-tangerine-380d9862c399602045886fb05ee628539675383c.tar.xz
go-tangerine-380d9862c399602045886fb05ee628539675383c.tar.zst
go-tangerine-380d9862c399602045886fb05ee628539675383c.zip
tests in progress, fixed utf characters conversion in toAscii
Diffstat (limited to 'lib/web3.js')
-rw-r--r--lib/web3.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/web3.js b/lib/web3.js
index 4220114f9..85f2f9065 100644
--- a/lib/web3.js
+++ b/lib/web3.js
@@ -244,12 +244,12 @@ var web3 = {
if (hex.substring(0, 2) === '0x')
i = 2;
for(; i < l; i+=2) {
- var code = hex.charCodeAt(i);
+ var code = parseInt(hex.substr(i, 2), 16);
if(code === 0) {
break;
}
- str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
+ str += String.fromCharCode(code);
}
return str;