Merge pull request #1241 from nspcc-dev/fix/string
Ensure strings are valid UTF-8 where appropriate
This commit is contained in:
commit
00671deb8f
10 changed files with 68 additions and 46 deletions
|
@ -205,7 +205,7 @@ func runtimeEncode(_ *interop.Context, v *vm.VM) error {
|
|||
|
||||
// runtimeDecode decodes top stack item from base64 string to byte array.
|
||||
func runtimeDecode(_ *interop.Context, v *vm.VM) error {
|
||||
src := string(v.Estack().Pop().Bytes())
|
||||
src := v.Estack().Pop().String()
|
||||
result, err := base64.StdEncoding.DecodeString(src)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue