diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 18a378e69b..80f75fcd7b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2008-01-12 13:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/itemapi.c + ! fixed hb_itemLockReadCPtr() used for static strings + 2008-01-11 22:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/itemapi.c ! use hb_xRefFree() instead of hb_xRefDec() in hb_itemUnLockCPtr() diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 36a1c3cdea..27d339df1f 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -445,6 +445,8 @@ HB_EXPORT char * hb_itemLockReadCPtr( PHB_ITEM pItem, ULONG * pulLen ) if( pItem && HB_IS_STRING( pItem ) ) { + if( pItem->item.asString.allocated == 0 ) + hb_itemUnShareString( pItem ); if( pulLen ) *pulLen = pItem->item.asString.length; hb_xRefInc( pItem->item.asString.value );