From 075bf06c715b5f198916360350f06acd88e9be90 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Fri, 19 Aug 2011 21:19:06 +0800 Subject: Fix crash in prerender_save when STKM is near bottom of save diff --git a/src/graphics.c b/src/graphics.c index 696cab9..9078386 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -4441,35 +4441,29 @@ pixel *prerender_save(void *save, int size, int *width, int *height) j=d[p++]; if (j0) { - if (j==PT_STKM) + if (j==PT_STKM || j==PT_STKM2) { - //Stickman drawing - for (k=-2; k<=1; k++) + pixel lc, hc=PIXRGB(255, 224, 178); + if (j==PT_STKM) lc = PIXRGB(255, 255, 255); + else lc = PIXRGB(100, 100, 255); + //only need to check upper bound of y coord - lower bounds and x