doom: fix out-of-bounds access of caps->samprs

Change-Id: Icde0146648477dbd0442c67258ff6ae1ff62c994
This commit is contained in:
mojyack 2026-03-31 12:16:46 +09:00
parent b5e3789dc1
commit 4cd3d3c519

View file

@ -491,7 +491,8 @@ void I_InitSound()
break;
}
if (i == caps->num_samprs)
i = SAMPR_44;
samplerate = SAMPR_44;
else
samplerate = caps->samprs[i];
// Initialize external data (all sounds) at start, keep static.