1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 07:22:54 +08:00

Fix off-by-one on repeatCount.

This commit is contained in:
smoogipooo 2017-04-22 20:53:55 +09:00
parent 1bb0b96ddc
commit ec04ceaece

View File

@ -80,7 +80,8 @@ namespace osu.Game.Rulesets.Objects.Legacy
readCustomSampleBanks(split[10], bankInfo);
// One node for each repeat + the start and end nodes
int nodes = repeatCount + 2;
// Note that the first length of the slider is considered a repeat, but there are no actual repeats happening
int nodes = Math.Max(0, repeatCount - 1) + 2;
// Populate node sample bank infos with the default hit object sample bank
var nodeBankInfos = new List<SampleBankInfo>();