ii

git clone https://orangeshoelaces.net/git/ii.git

09eef156ab48f475c4b38caca96d36a519f8984b

Author: nion@h4447.serverkompetenz.net on 03/13/2006

Committer: nion@h4447.serverkompetenz.net on 03/13/2006

small fix

Stats

ii.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/ii.c b/ii.c
index da42e80..247d138 100644
--- a/ii.c
+++ b/ii.c
@@ -206,7 +206,7 @@ static size_t tokenize(char **result, size_t reslen, char *str, char delim)
 		} else
 			n++;
 	}
-	if(i<reslen)
+	if(i<reslen && p < n && strlen(p))
 		result[i++] = p;
 	return i;				/* number of tokens */
 }