Prevent integer overflow with emp_decor
This commit is contained in:
parent
56764a2309
commit
1af0a86e0d
@ -1733,7 +1733,7 @@ void draw_other(pixel *vid) // EMP effect
|
|||||||
if (emp_decor>40) emp_decor=40;
|
if (emp_decor>40) emp_decor=40;
|
||||||
if (cmode==CM_NOTHING) // no in nothing mode
|
if (cmode==CM_NOTHING) // no in nothing mode
|
||||||
return;
|
return;
|
||||||
if (emp_decor)
|
if (emp_decor>0)
|
||||||
{
|
{
|
||||||
int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255;
|
int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255;
|
||||||
int a=(1.0*emp_decor/110)*255;
|
int a=(1.0*emp_decor/110)*255;
|
||||||
|
Loading…
Reference in New Issue
Block a user