good morning!!!!

Skip to content
Snippets Groups Projects
Commit a626b7eb authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Fixed string data

parent 3331bb29
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,7 @@ func FormatData(data string) []byte { ...@@ -118,7 +118,7 @@ func FormatData(data string) []byte {
// Simple stupid // Simple stupid
d := new(big.Int) d := new(big.Int)
if data[0:1] == "\"" && data[len(data)-1:] == "\"" { 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" { } else if len(data) > 1 && data[:2] == "0x" {
d.SetBytes(Hex2Bytes(data[2:])) d.SetBytes(Hex2Bytes(data[2:]))
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment