We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95c4493 commit 42fe475Copy full SHA for 42fe475
Assets/USharpVideo/Scripts/USharpVideoPlayer.cs
@@ -985,10 +985,10 @@ public void PlayNextVideoFromPlaylist()
985
{
986
Random.InitState(_shuffleSeed);
987
988
- int n = playlist.Length - 1;
989
- for (int i = 0; i < n; ++i)
+ for (int i = 0; i < playlist.Length - 1; ++i)
990
991
- int r = Random.Range(i + 1, n);
+ int r = Random.Range(i, playlist.Length);
+ if (i == r) { continue; }
992
VRCUrl flipVal = playlist[r];
993
playlist[r] = playlist[i];
994
playlist[i] = flipVal;
0 commit comments