1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

fix infinite repeat count when adjusting length of 0 length slider

This commit is contained in:
OliBomby 2023-05-01 15:48:54 +02:00
parent 5c066c40b1
commit 1dc34ee25d

View File

@ -414,7 +414,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
double lengthOfOneRepeat = repeatHitObject.Duration / (repeatHitObject.RepeatCount + 1);
int proposedCount = Math.Max(0, (int)Math.Round(proposedDuration / lengthOfOneRepeat) - 1);
if (proposedCount == repeatHitObject.RepeatCount)
if (proposedCount == repeatHitObject.RepeatCount || lengthOfOneRepeat == 0)
return;
repeatHitObject.RepeatCount = proposedCount;