forked from TrueCloudLab/neoneo-go
Merge pull request #2006 from nspcc-dev/fix-diff-71613
vm: serialize `+` rune as `\u002B` for byte-contained stackitems
This commit is contained in:
commit
0a118cb476
1 changed files with 4 additions and 0 deletions
|
@ -111,6 +111,10 @@ func writeJSONString(w *io.BinWriter, it Item) {
|
|||
return
|
||||
}
|
||||
data, _ := json.Marshal(s) // error never occurs because `ToString` checks for validity
|
||||
|
||||
// ref https://github.com/neo-project/neo-modules/issues/375 and https://github.com/dotnet/runtime/issues/35281
|
||||
data = bytes.Replace(data, []byte{'+'}, []byte("\\u002B"), -1)
|
||||
|
||||
w.WriteBytes(data)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue