forked from mia/Aegisub
Fixed crash in spectrum analyzer zoom in
Originally committed to SVN as r481.
This commit is contained in:
parent
7674f3cec9
commit
f950d58ba5
1 changed files with 1 additions and 1 deletions
|
@ -541,7 +541,7 @@ void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) {
|
||||||
|
|
||||||
// Prepare variables
|
// Prepare variables
|
||||||
int halfwindow = window/2;
|
int halfwindow = window/2;
|
||||||
int posThres = int(double(halfwindow-cutOff)/double(h)*0.5/scale + 0.5);
|
int posThres = MAX(1,int(double(halfwindow-cutOff)/double(h)*0.5/scale + 0.5));
|
||||||
float mult = float(h)/float(halfwindow-cutOff)/255.0f;
|
float mult = float(h)/float(halfwindow-cutOff)/255.0f;
|
||||||
|
|
||||||
// Calculation loop
|
// Calculation loop
|
||||||
|
|
Loading…
Reference in a new issue