From 1af0a86e0d2f5659f4672a8db0ca67da6e980e51 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 14 Oct 2011 12:12:27 +0100 Subject: [PATCH] Prevent integer overflow with emp_decor --- src/graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics.c b/src/graphics.c index 80d0a4020..1751f8aea 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1733,7 +1733,7 @@ void draw_other(pixel *vid) // EMP effect if (emp_decor>40) emp_decor=40; if (cmode==CM_NOTHING) // no in nothing mode return; - if (emp_decor) + if (emp_decor>0) { int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255; int a=(1.0*emp_decor/110)*255;