Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv11869
Modified Files:
uobject.cpp
Log Message:
applied patch from Varan Dar
Index: uobject.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -C2 -d -r1.120 -r1.121
*** uobject.cpp 17 Dec 2003 12:10:58 -0000 1.120
--- uobject.cpp 12 Jan 2004 20:33:15 -0000 1.121
***************
*** 261,266 ****
// i is the count of real elements in the old array
cPythonScript **newScriptChain = new cPythonScript* [ count + 1 ];
! memcpy( newScriptChain, scriptChain, count * sizeof( cPythonScript* ) );
! newScriptChain[ count ] = Event;
newScriptChain[ 0 ] = reinterpret_cast< cPythonScript* >( count + 1 );
--- 261,266 ----
// i is the count of real elements in the old array
cPythonScript **newScriptChain = new cPythonScript* [ count + 1 ];
! memcpy( newScriptChain, scriptChain, (count+1) * sizeof( cPythonScript* ) );
! newScriptChain[ count+1 ] = Event;
newScriptChain[ 0 ] = reinterpret_cast< cPythonScript* >( count + 1 );
***************
*** 297,304 ****
unsigned int pos = 1;
! cPythonScript **newScriptChain = new cPythonScript*[ count - 1 ];
newScriptChain[0] = reinterpret_cast< cPythonScript* >( count - 1 );
! for( unsigned int i = 1; i <= count; ++i )
{
if( scriptChain[i]->name() != name )
--- 297,304 ----
unsigned int pos = 1;
! cPythonScript **newScriptChain = new cPythonScript*[ count ];
newScriptChain[0] = reinterpret_cast< cPythonScript* >( count - 1 );
! for( unsigned int i = 1; i < count; ++i )
{
if( scriptChain[i]->name() != name )
***************
*** 377,383 ****
// i is the count of real elements in the old array
! cPythonScript **newScriptChain = new cPythonScript* [ count + 1 ];
! memcpy( newScriptChain, scriptChain, count * sizeof( cPythonScript* ) );
! newScriptChain[ count ] = Event;
newScriptChain[ 0 ] = reinterpret_cast< cPythonScript* >( count + 1 );
--- 377,383 ----
// i is the count of real elements in the old array
! cPythonScript **newScriptChain = new cPythonScript* [ count + 2 ];
! memcpy( newScriptChain, scriptChain, (count+1) * sizeof( cPythonScript* ) );
! newScriptChain[ count+1 ] = Event;
newScriptChain[ 0 ] = reinterpret_cast< cPythonScript* >( count + 1 );
|