From aaaed342efc57e4c94aebac85b3c50f6ee0725de Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 12 Jul 2011 06:51:47 -0700 Subject: [PATCH] Fix cursor rendering and some potential crashes for LIFE, courtesy of jacksonmj --- src/graphics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index ecc6b4ac2..9dd10dda7 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2077,7 +2077,7 @@ void draw_parts(pixel *vid) blendpixel(vid, nx, ny, cr, cg, cb, 255); } - else if (t==PT_LIFE && parts[i].ctype < NGOLALT) { + else if (t==PT_LIFE && parts[i].ctype>=0 && parts[i].ctype < NGOLALT) { if (parts[i].ctype==NGT_LOTE)//colors for life states { if (parts[i].tmp==2) @@ -4214,7 +4214,7 @@ corrupt: void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry) { int i,j,c; - if (t