summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-14 11:12:27 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-14 11:12:27 (GMT)
commit1af0a86e0d2f5659f4672a8db0ca67da6e980e51 (patch)
tree649581741dbcd86a55a27889fb846131fadd4def /src
parent56764a2309b98b5112613b59d1bd4e6e1a99e417 (diff)
downloadpowder-1af0a86e0d2f5659f4672a8db0ca67da6e980e51.zip
powder-1af0a86e0d2f5659f4672a8db0ca67da6e980e51.tar.gz
Prevent integer overflow with emp_decor
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 80d0a40..1751f8a 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;