/*
- * $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 <assert.h>
#include <string.h>
static int skipSpace (const char *cp)
{
int i = 0;
- while (strchr (SPACECHR, cp[i]))
+ while (cp[i] && strchr (SPACECHR, cp[i]))
i++;
return i;
}