(vm *VM)
| 16 | } |
| 17 | |
| 18 | func opSlice(vm *VM) { |
| 19 | end := int64(vm.popInt()) |
| 20 | start := int64(vm.popInt()) |
| 21 | str := vm.popBytes() |
| 22 | if start < 0 || end < start || end > int64(len(str)) { |
| 23 | panic(errors.WithData(ErrSliceRange, "start", start, "end", end, "len(bytes)", len(str))) |
| 24 | } |
| 25 | str2 := append(Bytes{}, str[start:end]...) |
| 26 | vm.chargeCreate(str2) |
| 27 | vm.push(str2) |
| 28 | } |
nothing calls this directly
no test coverage detected