diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index ae02fa8..56b250c 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -163,6 +163,14 @@ end function getCorrectedIndex(from, offset) total = #songwheel.songs; + if (math.abs(offset) > total) then + if (offset < 0) then + offset = offset + total*math.floor(math.abs(offset)/total); + else + offset = offset - total*math.floor(math.abs(offset)/total); + end + end + index = from + offset; if index < 1 then