1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-20 17:51:21 +00:00

Fix: Do not shadow key index

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-08-09 15:29:51 +02:00
parent 4c86bf4811
commit 862c9ec7c4
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -102,12 +102,12 @@ func (d displayElementExec) Display(ctx context.Context, idx int, attributes map
tmpCol := color.RGBA{} tmpCol := color.RGBA{}
for idx, vp := range []*uint8{&tmpCol.R, &tmpCol.G, &tmpCol.B, &tmpCol.A} { for cidx, vp := range []*uint8{&tmpCol.R, &tmpCol.G, &tmpCol.B, &tmpCol.A} {
switch rgba[idx].(type) { switch rgba[cidx].(type) {
case int: case int:
*vp = uint8(rgba[idx].(int)) *vp = uint8(rgba[cidx].(int))
case float64: case float64:
*vp = uint8(rgba[idx].(float64)) *vp = uint8(rgba[cidx].(float64))
} }
} }