[Plib-cvs] plib/src/ssg ssg.h,1.137,1.138 ssgList.cxx,1.6,1.7
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-06-10 16:07:16
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv10121 Modified Files: ssg.h ssgList.cxx Log Message: Ensure that ssgList 'next' member variable gets initialized (thanks to Cameron Moore and Franz Melchior) Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- ssg.h 10 Jun 2002 14:15:13 -0000 1.137 +++ ssg.h 10 Jun 2002 16:07:13 -0000 1.138 @@ -210,7 +210,7 @@ ssgEntity *getEntity ( unsigned int n ) { - next = n ; + next = n + 1 ; return ( n >= total ) ? (ssgEntity *) NULL : entity_list [ n ] ; } @@ -232,7 +232,7 @@ } int getNumEntities (void) { return total ; } - ssgEntity *getNextEntity (void) { return getEntity ( next+1 ) ; } + ssgEntity *getNextEntity (void) { return getEntity ( next ) ; } int searchForEntity ( ssgEntity *entity ) ; } ; Index: ssgList.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgList.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ssgList.cxx 7 Nov 2001 23:51:09 -0000 1.6 +++ ssgList.cxx 10 Jun 2002 16:07:13 -0000 1.7 @@ -27,6 +27,7 @@ ssgList::ssgList ( int init ) { total = 0 ; + next = 0 ; entity_list = new ssgEntity * [ limit = (init <= 0) ? 1 : init ] ; } |