From 42de48ad318a2c908e87a5658f6003e05afa73db Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 8 Nov 2001 10:23:02 +0000 Subject: [PATCH] Fixed bug in skipSpace (didn't check for null-byte). --- hswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 1.7.10.4