X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=hswitch.c;h=15ddbc61bb29fc17a7441efa0b9a59110b97c065;hb=9d3f82cd1140362487d8fa6372cac1b24a49d21e;hp=c55e66de64e41e2ec2ac15ec25f41407ca99852a;hpb=833faf12d797d629cae34abc8e84e88a6044eb7f;p=tclrobot.git 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; }