From a626b7ebe1fa5f1029840e25e88a4de426cf64c4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 17 Jul 2014 17:11:00 +0200 Subject: Fixed string data --- ethutil/bytes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit