mirror of https://bitbucket.org/ausocean/av.git
psi: using copy inside UpdateLocation() instead of range
This commit is contained in:
parent
0d3abd5798
commit
261118187b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue