prevent division by zero, part 1
This commit is contained in:
parent
6960112f69
commit
b24c572632
4 changed files with 6 additions and 4 deletions
|
|
@ -57,6 +57,7 @@ unsigned char DivPlatformTIA::dealWithFreq(unsigned char shape, int base, int pi
|
|||
}
|
||||
int bp=base+pitch;
|
||||
double mult=0.25*(parent->song.tuning*0.0625)*pow(2.0,double(768+bp)/(256.0*12.0));
|
||||
if (mult<0.5) mult=0.5;
|
||||
switch (shape) {
|
||||
case 1: // buzzy
|
||||
return ceil(31400/(30.6*mult))-1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue