diff --git a/stream/mts/psi/helpers.go b/stream/mts/psi/helpers.go index 9a4bb849..3448a0eb 100644 --- a/stream/mts/psi/helpers.go +++ b/stream/mts/psi/helpers.go @@ -114,9 +114,7 @@ func UpdateLocation(d []byte, s string) error { return errors.New("pmt does not location descriptor, cannot update") } gb := LocationStrBytes(s) - for i := range d[locationDataIndx : locationDataIndx+locationDataSize] { - d[i+locationDataIndx] = gb[i] - } + copy(d[locationDataIndx:locationDataIndx+locationDataSize], gb) d = updateCrc(d) return nil }