diff --git a/src/convertmode/bytecolor2colorcode.go b/src/convertmode/bytecolor2colorcode.go index f2b44d9..c94eeca 100644 --- a/src/convertmode/bytecolor2colorcode.go +++ b/src/convertmode/bytecolor2colorcode.go @@ -24,7 +24,7 @@ func (_ ByteColor2ColorCode) ToCan(input []byte) (can.Frame, error) { return can.Frame{}, errors.New(fmt.Sprintf("Error while converting: %s", err.Error())) } var returner = can.Frame{Length: 3} - copy(res, returner.Data[0:3]) + copy(returner.Data[0:3], res) // copy (dst, src) return returner, nil } @@ -34,4 +34,4 @@ func (_ ByteColor2ColorCode) ToMqtt(input can.Frame) ([]byte, error) { } colorstring := hex.EncodeToString(input.Data[0:3]) return []byte("#" + colorstring), nil -} \ No newline at end of file +}