ii

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

500e03ff90495cafa7428a2afc3765452d8e2b34

Author: Nico Golde on 01/29/2007

Committer: Nico Golde on 01/29/2007

small fix

Stats

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

Patch

diff --git a/ii.c b/ii.c
index 99235ef..d08c43c 100644
--- a/ii.c
+++ b/ii.c
@@ -318,7 +318,7 @@ static void proc_server_cmd(char *buf)
 	   <crlf>     ::= CR LF
 	 */
 	if(buf[0] == ':') {		/* check prefix */
-		p = strchr(buf, ' ');
+		if (!(p = strchr(buf, ' '))) return;
 		*p = 0;
 		for(++p; *p == ' '; p++);
 		cmd = p;