From 09f146a0b62e6d5b7a149d265850f6853a311c10 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Wed, 1 Oct 2014 08:44:17 +0000 Subject: [PATCH] fix whitespace handling error git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38100 72102866-910b-0410-8b05-ffd578937521 --- EcConsole.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EcConsole.m b/EcConsole.m index 77a201a..289e581 100644 --- a/EcConsole.m +++ b/EcConsole.m @@ -449,7 +449,7 @@ static BOOL commandIsRepeat (NSString *string) if (words == nil || [words count] == 0) { - cmd = @""; + return; } else { @@ -599,7 +599,11 @@ static BOOL commandIsRepeat (NSString *string) wordsEnum = [[_line componentsSeparatedByString: @" "] objectEnumerator]; while ((word = [wordsEnum nextObject]) != nil) { - [words addObject: [word stringByTrimmingSpaces]]; + word = [word stringByTrimmingSpaces]; + if ([word length] > 0) + { + [words addObject: word]; + } } /* invoke server */