diff --git a/historic/jam/src/lists.c b/historic/jam/src/lists.c index b8d2dae79..c75c544e8 100644 --- a/historic/jam/src/lists.c +++ b/historic/jam/src/lists.c @@ -172,8 +172,12 @@ LIST * list_pop_front( LIST *l ) void list_print( LIST *l ) { - for( ; l; l = list_next( l ) ) - printf( "%s ", l->string ); + LIST *p = 0; + for( ; l; p = l, l = list_next( l ) ) + if ( p ) + printf( "%s ", p->string ); + if ( p ) + printf( "%s", p->string ); } /* diff --git a/jam_src/lists.c b/jam_src/lists.c index b8d2dae79..c75c544e8 100644 --- a/jam_src/lists.c +++ b/jam_src/lists.c @@ -172,8 +172,12 @@ LIST * list_pop_front( LIST *l ) void list_print( LIST *l ) { - for( ; l; l = list_next( l ) ) - printf( "%s ", l->string ); + LIST *p = 0; + for( ; l; p = l, l = list_next( l ) ) + if ( p ) + printf( "%s ", p->string ); + if ( p ) + printf( "%s", p->string ); } /*