diff --git a/data.go b/data.go index f2cc79b..2f3eacb 100644 --- a/data.go +++ b/data.go @@ -54,6 +54,7 @@ func ParseDataBlock(data []byte, dataType uint8, confirmed bool) (*DataBlock, er return nil, fmt.Errorf("dmr: block CRC error (%#04x != %#04x)", crc, db.CRC) } } else { + db.Data = make([]byte, db.Length) copy(db.Data, data[:db.Length]) }