mirror of
https://github.com/taigrr/gico.git
synced 2026-04-02 03:09:07 -07:00
fix oob
This commit is contained in:
@@ -39,7 +39,7 @@ func ColorForFrequency(freq, min, max int) sc.SimpleColor {
|
|||||||
return sc.SimpleColor(0)
|
return sc.SimpleColor(0)
|
||||||
}
|
}
|
||||||
spread := max - min
|
spread := max - min
|
||||||
if spread < len(colorScheme)+1 {
|
if spread < len(colorScheme)-1 {
|
||||||
return colorScheme[freq-min+1]
|
return colorScheme[freq-min+1]
|
||||||
}
|
}
|
||||||
interval := float64(spread) / float64(len(colorScheme))
|
interval := float64(spread) / float64(len(colorScheme))
|
||||||
|
|||||||
Reference in New Issue
Block a user