rework byte array calculation in marshal functions

This commit is contained in:
Joel Wetzell
2026-05-30 10:53:50 -05:00
parent 37ca97c5ab
commit 6630584ae7
15 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func (ad *ArtDmx) UnmarshalBinary(data []byte) error {
func (ad *ArtDmx) MarshalBinary() ([]byte, error) {
// TODO(jwetzell): check max data length
data := make([]byte, 8+10+len(ad.Data))
data := make([]byte, 12+6+len(ad.Data))
copy(data[0:8], ArtNetID[:])
binary.LittleEndian.PutUint16(data[8:10], OpDmx)
data[10] = 0