From f13ff01ffa58246d5e780f2014d0d6a872aa64db Mon Sep 17 00:00:00 2001 From: lordwelch Date: Mon, 6 Nov 2017 23:56:40 -0700 Subject: [PATCH] Fix binary encoding --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 0e1d5ca..ddf200b 100644 --- a/main.go +++ b/main.go @@ -135,7 +135,7 @@ func main() { } changeKeymap(r, keys, args, hidg0, ¤tKeyMap) _, err = fmt.Sscanf(keys[args.ORDER[currentKeyMap]][string(r)].Modifier, "%b", flag) - binary.LittleEndian.PutUint64(report[:], uint64(keys[args.ORDER[currentKeyMap]][string(r)].Decimal)) + binary.LittleEndian.PutUint16(report[:], uint16(keys[args.ORDER[currentKeyMap]][string(r)].Decimal)) Press([8]byte{flag, 0, report[0], report[1], report[2], report[3], report[4], report[5]}, hidg0) }