From d8716ce8bc845bb7a3c8c2c4a569a7268d922a11 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Mon, 10 Jul 2023 21:10:34 +0100 Subject: [PATCH] chore: fix index out of bounds --- src/render.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render.rs b/src/render.rs index 5c58bab..ea71a7a 100644 --- a/src/render.rs +++ b/src/render.rs @@ -168,7 +168,7 @@ impl Render { local_led_config.push(LocalLedConfiguration { tag, start, end }); } - self.num_leds = current_pos; + self.num_leds = current_pos + 1; println!( "Loaded: {} leds, with config: {:?}", self.num_leds, local_led_config