From e842b7f7886939c2d5f1665c673ae9bcd06d8239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 9 Jan 2014 02:01:38 +0100 Subject: [PATCH] 2014-01-09 02:01 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/vm/itemapi.c ! clear destination item in hb_itemParamStore*() functions if passed source item is NULL --- ChangeLog.txt | 5 +++++ src/vm/itemapi.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index decfaed0b2..d7ec756126 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-01-09 02:01 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/vm/itemapi.c + ! clear destination item in hb_itemParamStore*() functions if passed + source item is NULL + 2014-01-07 13:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbfoxpro/hbfoxpro.hbp * contrib/hbfoxpro/misc.prg diff --git a/src/vm/itemapi.c b/src/vm/itemapi.c index 0989c1ee14..d6e6a83602 100644 --- a/src/vm/itemapi.c +++ b/src/vm/itemapi.c @@ -130,7 +130,7 @@ HB_BOOL hb_itemParamStore( HB_USHORT uiParam, PHB_ITEM pItem ) if( pItem ) hb_itemCopyToRef( pDest, pItem ); else - hb_itemSetNil( pDest ); + hb_itemSetNil( hb_itemUnRef( pDest ) ); return HB_TRUE; } @@ -149,7 +149,7 @@ HB_BOOL hb_itemParamStoreForward( HB_USHORT uiParam, PHB_ITEM pItem ) if( pItem ) hb_itemMoveToRef( pDest, pItem ); else - hb_itemSetNil( pDest ); + hb_itemSetNil( hb_itemUnRef( pDest ) ); return HB_TRUE; } @@ -171,7 +171,7 @@ HB_BOOL hb_itemParamStoreRelease( HB_USHORT uiParam, PHB_ITEM pItem ) hb_itemRelease( pItem ); } else - hb_itemSetNil( pDest ); + hb_itemSetNil( hb_itemUnRef( pDest ) ); return HB_TRUE; }