mirror of
https://github.com/jwetzell/artnet-go.git
synced 2026-09-03 12:58:59 +00:00
rework byte array calculation in marshal functions
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ func (at *ArtTrigger) UnmarshalBinary(data []byte) error {
|
||||
}
|
||||
|
||||
func (at *ArtTrigger) MarshalBinary() ([]byte, error) {
|
||||
data := make([]byte, 8+10)
|
||||
data := make([]byte, 12+6)
|
||||
copy(data[0:8], at.id[:])
|
||||
binary.LittleEndian.PutUint16(data[8:10], at.opCode)
|
||||
data[10] = at.ProtVerHi
|
||||
|
||||
Reference in New Issue
Block a user