fix random splash file selection logic in SplashScreenView (#2999)

This commit is contained in:
Totoo
2026-02-17 08:52:08 +01:00
committed by GitHub
parent 300a4b03c6
commit 785bd06938
+1 -1
View File
@@ -1089,7 +1089,7 @@ void SplashScreenView::get_random_splash_file(std::filesystem::path& path) {
(ext[3] == 'P' || ext[3] == 'p')) {
valid_count++;
// Reservoir Sampling:
if ((myrand(&rng_state) % valid_count) == 0) {
if (((rng_state = myrand(&rng_state)) % valid_count) == 0) {
path = splash_dir / fno.fname;
}
}