See ChangeLog entry 2002-12-18 14:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
2002-12-18 19:05:30 +00:00
parent a500cb7e89
commit 1f7ba8f009
2 changed files with 15 additions and 1 deletions

View File

@@ -8,6 +8,10 @@
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2002-12-18 14:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>
* source/rtl/set.c
! In the set_string function, when then item parameter is NIL use a
zero-length string (bug fix for SET PATH TO and SET DEFAULT TO).
2002-12-17 10:50 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* contrib/rdd_ads/ads.ch

View File

@@ -158,7 +158,8 @@ static int set_number( PHB_ITEM pItem, int iOldValue )
static char * set_string( PHB_ITEM pItem, char * szOldString )
{
char * szString;
char * szString = NULL;
ULONG ulLen = 0;
HB_TRACE(HB_TR_DEBUG, ("set_string(%p, %s)", pItem, szOldString));
@@ -175,8 +176,17 @@ static char * set_string( PHB_ITEM pItem, char * szOldString )
memcpy( szString, hb_itemGetCPtr( pItem ), ulLen );
szString[ ulLen ] = '\0';
}
else if( HB_IS_NIL( pItem ) )
{
if( szOldString ) szString = ( char * ) hb_xrealloc( szOldString, 1 );
else szString = ( char * ) hb_xgrab( 1 );
szString[ 0 ] = '\0';
}
else
{
szString = szOldString;
}
return szString;
}