From 17f273243d673c7d113c0bb1a3fb4d70f851274c Mon Sep 17 00:00:00 2001 From: ehime-iyokan Date: Mon, 4 Nov 2024 12:22:58 +0900 Subject: [PATCH] hub75: fix data buffering --- hub75/hub75.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub75/hub75.go b/hub75/hub75.go index 8205a53..427d849 100644 --- a/hub75/hub75.go +++ b/hub75/hub75.go @@ -167,7 +167,7 @@ func (d *Device) fillMatrixBuffer(x int16, y int16, r uint8, g uint8, b uint8) { if r > colorTresh { d.buffer[c][offsetR] |= 1 << bitSelect } else { - d.buffer[c][offsetR] = d.buffer[c][offsetR] &^ 1 << bitSelect + d.buffer[c][offsetR] &^= 1 << bitSelect } if g > colorTresh { d.buffer[(c+d.colorThirdStep)%d.colorDepth][offsetG] |= 1 << bitSelect