From bb3b380a18dd09d71f236c8f233b060f29f76343 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 22 Jul 2025 15:09:53 -0300 Subject: [PATCH] fix: anim out of bounds (#283) Signed-off-by: Carlos Alexandro Becker --- internal/tui/components/anim/anim.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/tui/components/anim/anim.go b/internal/tui/components/anim/anim.go index 07d02483d0b470b6b4cadf36fbe5acd52e8857ba..241522c8989c89bf8eb877c69b9a72f01508c5f4 100644 --- a/internal/tui/components/anim/anim.go +++ b/internal/tui/components/anim/anim.go @@ -289,7 +289,7 @@ func (a Anim) View() string { var b strings.Builder for i := range a.width { switch { - case !a.initialized && time.Since(a.startTime) < a.birthOffsets[i]: + case !a.initialized && i < len(a.birthOffsets) && time.Since(a.startTime) < a.birthOffsets[i]: // Birth offset not reached: render initial character. b.WriteString(a.initialFrames[a.step][i]) case i < a.cyclingCharWidth: