summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-14 11:11:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-14 11:11:09 (GMT)
commit56764a2309b98b5112613b59d1bd4e6e1a99e417 (patch)
tree17df1216f645dce2ad06b6a9aee5e730f69e38a1 /src
parent83b4f7e1eca0ee29bf656fa7c714c835718bb192 (diff)
downloadpowder-56764a2309b98b5112613b59d1bd4e6e1a99e417.zip
powder-56764a2309b98b5112613b59d1bd4e6e1a99e417.tar.gz
Prevent integer overflow with emp_decor
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 1f10b11..80d0a40 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1740,6 +1740,7 @@ void draw_other(pixel *vid) // EMP effect
if (r>255) r=255;
if (g>255) g=255;
if (b>255) g=255;
+ if (a>255) a=255;
for (j=0; j<YRES; j++)
for (i=0; i<XRES; i++)
{