diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-22 14:37:55 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-22 14:37:55 +0200 |
commit | 1b29f83c7f9f8afa4f1ab247513bcacc2507156f (patch) | |
tree | 76d7718cd52b979d690c05d713b732f21e6f84ed /slice/slice.go | |
parent | ca5855639a1a95f04ac2dbd5da5d9d770935cc3c (diff) | |
download | dna-backup-1b29f83c7f9f8afa4f1ab247513bcacc2507156f.tar.gz dna-backup-1b29f83c7f9f8afa4f1ab247513bcacc2507156f.zip |
fix slice.Patch with empty delta
Diffstat (limited to 'slice/slice.go')
-rw-r--r-- | slice/slice.go | 1 |
1 files changed, 1 insertions, 0 deletions
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 } |