Enlightenment CVS committal Author : kwo Project : e16 Module : epplets
Dir : e16/epplets/epplets Modified Files: E-Cpu.c E-NetFlame.c Log Message: Fix potential rendering bug (patch by Melvin Meadlin II). =================================================================== RCS file: /cvs/e/e16/epplets/epplets/E-Cpu.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- E-Cpu.c 28 Sep 2006 21:03:04 -0000 1.24 +++ E-Cpu.c 17 Mar 2007 02:38:18 -0000 1.25 @@ -20,7 +20,7 @@ Window win; RGB_buf buf; Epplet_gadget da, b_close, b_config, b_help, b_nice, pop; -int *flame = NULL; +unsigned int *flame = NULL; int *vspread, *hspread, *residual; unsigned char rm[255], gm[255], bm[255]; int include_nice = 0; @@ -115,15 +115,15 @@ draw_flame(void) { unsigned char *rgb, *rptr; - int x, y, *ptr, val1, val2, val3, i, j; + unsigned int *ptr; + int x, y, val1, val2, val3, i, j; if (!flame) { vspread = malloc(40 * sizeof(int)); hspread = malloc(40 * sizeof(int)); residual = malloc(40 * sizeof(int)); - flame = malloc(sizeof(int) * 40 * 40); - memset(flame, 0, sizeof(int) * 40 * 40); + flame = calloc(40 * 40, sizeof(unsigned int)); } ptr = flame + (39 * 40); =================================================================== RCS file: /cvs/e/e16/epplets/epplets/E-NetFlame.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- E-NetFlame.c 28 Sep 2006 21:03:04 -0000 1.14 +++ E-NetFlame.c 17 Mar 2007 02:38:18 -0000 1.15 @@ -17,7 +17,7 @@ Window win; RGB_buf buf; Epplet_gadget da, b_close, b_config, b_help, pop, pop2, text; -int *flame = NULL; +unsigned int *flame = NULL; int *vspread, *hspread, *residual; unsigned char rm[255], gm[255], bm[255]; char *netdev; @@ -129,7 +129,8 @@ draw_flame(void) { unsigned char *rgb, *rptr; - int x, y, *ptr, val1, val2, val3, i, j; + unsigned int *ptr; + int x, y, val1, val2, val3, i, j; /* initialize the flame if it isn't done already */ if (!flame) @@ -137,7 +138,7 @@ vspread = malloc(WIDTH * sizeof(int)); hspread = malloc(WIDTH * sizeof(int)); residual = malloc(WIDTH * sizeof(int)); - flame = calloc(WIDTH * HEIGHT, sizeof(int)); + flame = calloc(WIDTH * HEIGHT, sizeof(unsigned int)); } /* move to the bottom left of the drawing area */ ptr = flame + ((HEIGHT - 1) * WIDTH); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs