diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-07-06 09:08:13 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-07-06 09:44:56 (GMT) |
| commit | 11dbdb9314e4f1a4d60201ae5b2d6a5f6f7fc310 (patch) | |
| tree | b16618d039d49815569cea3e8a446f3d869dfe2f /src/graphics.c | |
| parent | 8754bb0bf6effef6ff11d23e5087f4b6ef618496 (diff) | |
| download | powder-11dbdb9314e4f1a4d60201ae5b2d6a5f6f7fc310.zip powder-11dbdb9314e4f1a4d60201ae5b2d6a5f6f7fc310.tar.gz | |
Fix crashing when pipe has a negative tmp value
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graphics.c b/src/graphics.c index 8bdd6fa..a45b02d 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2377,7 +2377,7 @@ void draw_parts(pixel *vid) cg = PIXG(ptypes[t].pcolors); cb = PIXB(ptypes[t].pcolors); } - if (parts[i].tmp) + if (parts[i].tmp>0 && parts[i].tmp<PT_NUM) { cr = PIXR(ptypes[parts[i].tmp].pcolors); cg = PIXG(ptypes[parts[i].tmp].pcolors); |
