From 418e26c0ac172c6a1c92cd2d5bdb3e4325bca5aa Mon Sep 17 00:00:00 2001 From: axel Date: Wed, 14 Dec 2005 23:46:44 +1000 Subject: [PATCH] Fix crash bug from calling eval builtin with no arguments darcs-hash:20051214134644-ac50b-5872ff628bf4f5d4f22f912d7ce7e9ed25d48b58.gz --- builtin.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/builtin.c b/builtin.c index 42a54059f..d5fff50ed 100644 --- a/builtin.c +++ b/builtin.c @@ -1750,28 +1750,20 @@ static int builtin_status( wchar_t **argv ) */ static int builtin_eval( wchar_t **argv ) { - wchar_t *tot, **ptr, *next; - int totlen=0; - - for( ptr = argv+1; *ptr; ptr++ ) + string_buffer_t sb; + int i; + int argc = builtin_count_args( argv ); + sb_init( &sb ); + + for( i=1; i