From feda32e82dd90d0de7da0f6a2416d2877057bc1d Mon Sep 17 00:00:00 2001 From: syspart <52237906+syspart@users.noreply.github.com> Date: Thu, 11 Jul 2019 21:33:45 +0200 Subject: [PATCH] Overflow error on long messages --- led-badge-11x44.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/led-badge-11x44.py b/led-badge-11x44.py index 4cf6b5a..2995c35 100755 --- a/led-badge-11x44.py +++ b/led-badge-11x44.py @@ -376,7 +376,9 @@ def header(lengths, speeds, modes, blink, ants): h[8+i] = 16*s[i] + m[i] for i in range(len(lengths)): - h[17+2*i] = lengths[i] + h[17+(2*i)-1] = lengths[i] // 256 + h[17+(2*i)] = lengths[i] % 256 + return h