psi: don't panic when LocationStrBytes get's non 32 byte str

This commit is contained in:
saxon 2018-12-14 18:46:19 +10:30
parent c7f55c3c43
commit d8587bdbe2
1 changed files with 0 additions and 3 deletions

View File

@ -106,9 +106,6 @@ func LocationFrom(p []byte) (g string, err error) {
// LocationStrBytes take a string of location data and converts to a 32 byte slice -
// easy update of slice representation of a pmt with location descriptor
func LocationStrBytes(s string) []byte {
if len(s) != locationDataSize {
panic("Location string not the right size")
}
var b [locationDataSize]byte
copy(b[:], s)
return b[:]