mirror of
https://github.com/jwetzell/artnet-go.git
synced 2026-09-09 23:39:29 +00:00
rework byte array calculation in marshal functions
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ func (adr *ArtTodRequest) MarshalBinary() ([]byte, error) {
|
||||
if len(adr.Address) > 32 {
|
||||
return nil, errors.New("address count must not be greater than 32")
|
||||
}
|
||||
data := make([]byte, 8+16+len(adr.Address))
|
||||
data := make([]byte, 12+12+len(adr.Address))
|
||||
copy(data[0:8], ArtNetID[:])
|
||||
binary.LittleEndian.PutUint16(data[8:10], OpTodRequest)
|
||||
data[10] = 0
|
||||
|
||||
Reference in New Issue
Block a user