aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/bytes.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-17 23:11:00 +0800
committerobscuren <geffobscura@gmail.com>2014-07-17 23:11:00 +0800
commita626b7ebe1fa5f1029840e25e88a4de426cf64c4 (patch)
treea238ec1be5a2f5bd14bafa388daaa89b30b7b5fb /ethutil/bytes.go
parent3331bb29eaf6569925e0001f1b177c6b17b682af (diff)
downloadgo-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.tar
go-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.tar.gz
go-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.tar.bz2
go-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.tar.lz
go-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.tar.xz
go-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.tar.zst
go-tangerine-a626b7ebe1fa5f1029840e25e88a4de426cf64c4.zip
Fixed string data
Diffstat (limited to 'ethutil/bytes.go')
-rw-r--r--ethutil/bytes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethutil/bytes.go b/ethutil/bytes.go
index d16bd6780..34fff7d42 100644
--- a/ethutil/bytes.go
+++ b/ethutil/bytes.go
@@ -118,7 +118,7 @@ func FormatData(data string) []byte {
// Simple stupid
d := new(big.Int)
if data[0:1] == "\"" && data[len(data)-1:] == "\"" {
- return RightPadBytes([]byte(data), 32)
+ return RightPadBytes([]byte(data[1:len(data)-1]), 32)
} else if len(data) > 1 && data[:2] == "0x" {
d.SetBytes(Hex2Bytes(data[2:]))
} else {