diff options
author | 2007-01-28 23:43:31 +1000 | |
---|---|---|
committer | 2007-01-28 23:43:31 +1000 | |
commit | c02e2b13207448ee7504f361e3a1abf4fa946c82 (patch) | |
tree | f957bb4f9f211c94fc4779c07e9706581d267b30 /builtin_set.c | |
parent | 37a95a3096e2472c0607420a8208d1cac1730369 (diff) |
Empty environemnt variable array entrys are now set to the empty string - what value should they really have?
darcs-hash:20070128134331-ac50b-a1efdcd67e1d142c5f234a4018187fdb2f70b567.gz
Diffstat (limited to 'builtin_set.c')
-rw-r--r-- | builtin_set.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin_set.c b/builtin_set.c index e9e1e060..0ef50d0e 100644 --- a/builtin_set.c +++ b/builtin_set.c @@ -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++ ) { - 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 ) { sb_append( &sb, ARRAY_SEP_STR ); |