REmove duplicate input setter in engine

This commit is contained in:
lash 2023-04-01 23:58:26 +01:00
parent a90f41bfe4
commit c78f2a9c66
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -72,10 +72,6 @@ func (en *Engine) Exec(input []byte, ctx context.Context) error {
if len(code) == 0 { if len(code) == 0 {
return fmt.Errorf("no code to execute") return fmt.Errorf("no code to execute")
} }
err = en.st.SetInput(input)
if err != nil {
return err
}
code, err = vm.Run(code, en.st, en.rs, ctx) code, err = vm.Run(code, en.st, en.rs, ctx)
en.st.SetCode(code) en.st.SetCode(code)
return err return err