From 1b29f83c7f9f8afa4f1ab247513bcacc2507156f Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Wed, 22 Sep 2021 14:37:55 +0200 Subject: fix slice.Patch with empty delta --- slice/slice.go | 1 + 1 file changed, 1 insertion(+) (limited to 'slice/slice.go') diff --git a/slice/slice.go b/slice/slice.go index 6d7cf10..05441c8 100644 --- a/slice/slice.go +++ b/slice/slice.go @@ -46,6 +46,7 @@ func Patch(source Slice, delta Delta) (target Slice) { fill += len(ins.Value) prev = ins.Idx + len(ins.Value) } + copy(target[fill:], temp[tpos:]) return } -- cgit v1.2.3