summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-09-28 22:44:10 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-09-30 13:16:48 (GMT)
commit203db57e57532aca5903e07cdd408759ed150fec (patch)
treee4a88ddbcf382d850d0b7831980612d2102a91cd /src/elements
parentf5a9f43b77e8ff5f2db8c8c63b5d2a3e190041e4 (diff)
downloadpowder-203db57e57532aca5903e07cdd408759ed150fec.zip
powder-203db57e57532aca5903e07cdd408759ed150fec.tar.gz
Prevent segfault with high tmp values for pipe
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/elements/pipe.c b/src/elements/pipe.c
index 54e3fb6..7411932 100644
--- a/src/elements/pipe.c
+++ b/src/elements/pipe.c
@@ -45,7 +45,7 @@ void pushParticle(int i, int count, int original)
}
else //predefined 1 pixel thick pipe movement
{
- int coords = 7 - (parts[i].tmp>>10);
+ int coords = 7 - ((parts[i].tmp>>10)&7);
r = pmap[y+ pos_1_ry[coords]][x+ pos_1_rx[coords]];
if (!r)
{