mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Fixed: FMODSoundRenderer::DrawWaveDebug() only allocated enough space for the wavearray based
on the window_size, so for large numbers of output channels, it would not allocate enough space for the spectrum data (which is definied by SPECTRUM_SIZE, not the window_size) and write junk on the stack when drawing the spectrums, causing a crash. SVN r3087 (trunk)
This commit is contained in:
parent
2add3fb381
commit
869b9c9ccc
1 changed files with 1 additions and 1 deletions
|
@ -2555,7 +2555,7 @@ void FMODSoundRenderer::DrawWaveDebug(int mode)
|
||||||
// 16 pixels of padding between each window.
|
// 16 pixels of padding between each window.
|
||||||
window_size = (screen->GetWidth() - 16) / numoutchans - 16;
|
window_size = (screen->GetWidth() - 16) / numoutchans - 16;
|
||||||
|
|
||||||
float *wavearray = (float*)alloca(window_size*sizeof(float));
|
float *wavearray = (float*)alloca(MAX(SPECTRUM_SIZE,window_size)*sizeof(float));
|
||||||
|
|
||||||
y = 16;
|
y = 16;
|
||||||
y = DrawChannelGroupOutput(SfxGroup, wavearray, window_size, window_height, y, mode);
|
y = DrawChannelGroupOutput(SfxGroup, wavearray, window_size, window_height, y, mode);
|
||||||
|
|
Loading…
Reference in a new issue