Update of /cvsroot/plib/plib/src/util
In directory usw-pr-cvs1:/tmp/cvs-serv13583/plib/src/util
Modified Files:
ulList.cxx
Log Message:
Fixed bug in replaceEntity when 'old' is not present in the list.
Index: ulList.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/util/ulList.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ulList.cxx 2 Sep 2002 06:05:49 -0000 1.5
+++ ulList.cxx 26 Oct 2002 13:52:13 -0000 1.6
@@ -106,7 +106,10 @@
void ulList::replaceEntity ( unsigned int n, void *new_entity )
{
- entity_list [ n ] = new_entity;
-}
+ if ( n >= 0 )
+ entity_list [ n ] = new_entity;
+ else
+ addEntity ( new_entity ) ;
+}
|