From: Adam Dickmeiss Date: Thu, 8 Nov 2001 10:23:02 +0000 (+0000) Subject: Fixed bug in skipSpace (didn't check for null-byte). X-Git-Tag: ZMBOT.0.1~12 X-Git-Url: http://git.indexdata.com/?p=tclrobot.git;a=commitdiff_plain;h=42de48ad318a2c908e87a5658f6003e05afa73db Fixed bug in skipSpace (didn't check for null-byte). --- diff --git a/hswitch.c b/hswitch.c index c55e66d..15ddbc6 100644 --- a/hswitch.c +++ b/hswitch.c @@ -1,5 +1,5 @@ /* - * $Id: hswitch.c,v 1.4 2001/11/07 11:50:07 adam Exp $ + * $Id: hswitch.c,v 1.5 2001/11/08 10:23:02 adam Exp $ */ #include #include @@ -17,7 +17,7 @@ static int skipSpace (const char *cp) { int i = 0; - while (strchr (SPACECHR, cp[i])) + while (cp[i] && strchr (SPACECHR, cp[i])) i++; return i; }