See ChangeLog entry 2002-12-18 14:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user