Fixed string data

This commit is contained in:
obscuren 2014-07-17 17:11:00 +02:00
parent 3331bb29ea
commit a626b7ebe1

View File

@ -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 {