diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9187717a04..01bf5a0581 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2006-08-06 13:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/config/linux/owatcom.cf + * harbour/source/debug/debugger.prg + * changed checking for static initialization functions + + * harbour/source/vm/itemapi.c + ! fixed stupid typo in string unsharing which caused very serious bug + 2006-08-05 13:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/common/hbver.c * extended C compiler information diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index facc8a9b30..a653f79f9c 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -207,7 +207,7 @@ procedure __dbgEntry( nMode, uParam1, uParam2, uParam3 ) // debugger entry poin // add a call to the stack but don't try to show the code yet cProcName := ProcName( 1 ) - if cProcName == "(_INITSTATICS)" + if cProcName = "(_INITSTATICS" //module wide static variable AADD( __dbgStatics, { strip_path( uParam1 ), {} } ) return // We can not use s_oDebugger yet, so we return @@ -230,7 +230,7 @@ procedure __dbgEntry( nMode, uParam1, uParam2, uParam3 ) // debugger entry poin s_oDebugger:StackProc( uParam1, hb_dbg_ProcLevel()-1 ) case nMode == HB_DBG_ENDPROC - if ProcName( 1 ) == "(_INITSTATICS)" + if ProcName( 1 ) = "(_INITSTATICS" return endif IF( s_lExit ) @@ -265,7 +265,7 @@ procedure __dbgEntry( nMode, uParam1, uParam2, uParam3 ) // debugger entry poin nVarIndex := uParam2 cVarName := uParam3 cProcName := ProcName( 1 ) - if cProcName == "(_INITSTATICS)" + if cProcName = "(_INITSTATICS" //module wide static variable AAdd( ATAIL(__DbgStatics)[2], { cVarName, nVarIndex, "Static",, nSFrame } ) return // We can not use s_oDebugger yet, so we return diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 0c046535ed..8ddcfd186d 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -1544,9 +1544,9 @@ PHB_ITEM hb_itemUnShareString( PHB_ITEM pItem ) char *szText = ( char* ) hb_xgrab( ulLen ); hb_xmemcpy( szText, pItem->item.asString.value, ulLen ); - pItem->item.asString.value = szText; - if( ! pItem->item.asString.allocated ) + if( pItem->item.asString.allocated ) hb_xRefDec( pItem->item.asString.value ); + pItem->item.asString.value = szText; pItem->item.asString.allocated = ulLen; }