# HG changeset patch # User Thinker K.F. Li # Date 1261451092 -28800 # Node ID c3fe9e4bdec137d9af9a046c23bd8556934b63b2 # Parent abaf96c8d7efca207157a072e9bd5d8176052033 Fix a bug of a non-initialized variable. pos_cnt is not initialized before used. It causes - tank shows nothing at begining. - dynamic being segmentation fault for any X event at first few seconds. diff -r abaf96c8d7ef -r c3fe9e4bdec1 src/redraw_man.c --- a/src/redraw_man.c Sat Dec 19 08:22:58 2009 +0800 +++ b/src/redraw_man.c Tue Dec 22 11:04:52 2009 +0800 @@ -1349,6 +1349,7 @@ return ERR; } + pos_cnt = 0; FORCHILDREN(coord, child) { if(child->flags & COF_OWN_CANVAS) { area_to_positions(coord_get_area(child), poses + pos_cnt);