mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix infinite loop in DownSampleWav when s_khz
is less than 44 kHz
This fixes #330 where `s_khz` below 44 (the usual sample rate of mohaa wav files) would cause an infinite loop due to improper usage of the `ii` variable in the loop where another variable would be accidentally incremented instead
This commit is contained in:
parent
1d4fe357c8
commit
f8b97405ff
1 changed files with 1 additions and 1 deletions
|
@ -396,7 +396,7 @@ qboolean DownSampleWav(wavinfo_t *info, byte *wav, int wavlength, int newkhz, by
|
|||
error += newkhz;
|
||||
while (error > oldrate) {
|
||||
error -= oldrate;
|
||||
for (ii = 0; ii < width; i++) {
|
||||
for (ii = 0; ii < width; ii++) {
|
||||
data_p[ii] = datap[ii];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue