aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 6110e2a..d3a959b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -188,6 +188,10 @@ void TMR0_IRQHandler(void)
if ((brightness + 1) % 2)
leds_releaseall();
} else {
+ if (i + fb->scroll/SCROLL_IRATIO >= fb->width) {
+ leds_releaseall();
+ return;
+ }
led_write2dcol(i/2,
fb->buf[i+ fb->scroll/SCROLL_IRATIO],
fb->buf[i+ fb->scroll/SCROLL_IRATIO + 1]);