Empty environemnt variable array entrys are now set to the empty string - what value should they really have?

darcs-hash:20070128134331-ac50b-a1efdcd67e1d142c5f234a4018187fdb2f70b567.gz
This commit is contained in:
axel 2007-01-28 23:43:31 +10:00
parent 37a95a3096
commit c02e2b1320

View File

@ -141,7 +141,8 @@ static int my_env_set( const wchar_t *key, array_list_t *val, int scope )
{ {
for( i=0; i<al_get_count( val ); i++ ) for( i=0; i<al_get_count( val ); i++ )
{ {
sb_append( &sb, (wchar_t *)al_get( val, i ) ); wchar_t *next =(wchar_t *)al_get( val, i );
sb_append( &sb, next?next:L"" );
if( i<al_get_count( val )-1 ) if( i<al_get_count( val )-1 )
{ {
sb_append( &sb, ARRAY_SEP_STR ); sb_append( &sb, ARRAY_SEP_STR );