--- libaitwww/src/tools.c 2012/07/31 22:59:33 1.2.6.2 +++ libaitwww/src/tools.c 2012/08/01 00:40:41 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tools.c,v 1.2.6.2 2012/07/31 22:59:33 misho Exp $ +* $Id: tools.c,v 1.3 2012/08/01 00:40:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -60,12 +60,12 @@ www_cmp(const char *ct, const char *s) assert(ct && s); - while (isspace(*ct)) + while (isspace((int) *ct)) ct++; if (!(sc = strchr(ct, ';'))) sc = strchr(ct, '\x0'); - while (isspace(*(sc - 1))) + while (isspace((int) *(sc - 1))) sc--; if (strlen(s) != sc - ct) @@ -87,7 +87,7 @@ www_cmptype(const char *ct, const char *type) assert(ct && type); - while (isspace(*ct)) + while (isspace((int) *ct)) ct++; if (!(sl = strchr(ct, '/'))) @@ -162,7 +162,8 @@ www_unescape(char * __restrict str) { register int i, j; - assert(str); + if (!str) + return; for (i = j = 0; str[j]; i++, j++) { str[i] = str[j];