Fixes off-by-one error calculating frames

This commit is contained in:
Hugo Müller-Downing 2023-10-08 17:04:21 +11:00
parent 83af8cb0f4
commit c9f8b1a115

View file

@ -8,7 +8,7 @@ type FrameType struct {
// Create a function that returns the next frame, based on length
func DefaultGetFrame(frames []string) func(int) string {
return func(i int) string {
return frames[i%(len(frames)-1)]
return frames[i%(len(frames))]
}
}