Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 866e0e8

Browse files
meowgorithmkujtimiihoxha
authored andcommitted
fix(logo): possible division by zero
1 parent ddbc3ab commit 866e0e8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/tui/components/logo/logo.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,10 @@ func blendColors(size int, stops ...color.Color) []color.Color {
374374
segmentSize := segmentSizes[i]
375375

376376
for j := range segmentSize {
377-
t := float64(j) / float64(segmentSize)
377+
var t float64
378+
if segmentSize > 1 {
379+
t = float64(j) / float64(segmentSize-1)
380+
}
378381
c := c1.BlendHcl(c2, t)
379382
blended = append(blended, c)
380383
}

0 commit comments

Comments
 (0)