diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 313cd07f5d..ebc6439b81 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-07-04 04:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/classes.c + ! fixed typo in adding messages with HB_OO_MSG_PROPERTY flag + ! fixed __clsDelMsg() to be safe with later dictionary resizing + 2007-07-03 21:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbcompat.ch ! added closing parentheses in operators translation rules to avoid diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 8f42add5d3..4f735c6717 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -625,6 +625,7 @@ static void hb_clsFreeMsg( PCLASS pClass, PHB_DYNS pMsg ) if( hb_clsCanClearMethod( &pClass->pMethods[ * puiMsgIdx ], TRUE ) ) { memset( &pClass->pMethods[ * puiMsgIdx ], 0, sizeof( METHOD ) ); + * puiMsgIdx = 0; pClass->uiMethods--; /* Decrease number of messages */ } return; @@ -2526,12 +2527,12 @@ HB_FUNC( __CLSADDMSG ) nType == HB_OO_MSG_CLASSPROPERTY ) { char szAssign[ HB_SYMBOL_NAME_LEN + 1 ]; - int iLen = ( int ) hb_parclen( 1 ); + int iLen = ( int ) hb_parclen( 2 ); if( iLen >= HB_SYMBOL_NAME_LEN ) iLen = HB_SYMBOL_NAME_LEN - 1; szAssign[ 0 ] = '_'; memcpy( szAssign + 1, szMessage, iLen ); - szAssign[ iLen ] = '\0'; + szAssign[ iLen + 1 ] = '\0'; uiScope = ( uiScope | HB_OO_CLSTP_EXPORTED ) & ~( HB_OO_CLSTP_PROTECTED | HB_OO_CLSTP_HIDDEN );