From: Gerd Moellmann Date: Fri, 15 Dec 2000 14:33:25 +0000 (+0000) Subject: (get_keyword): Make sure that isspace and X-Git-Tag: emacs-pretest-21.0.95~485 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=859cbb401c0f233886ac8f13a1bb2ab7bf09f0a8;p=emacs.git (get_keyword): Make sure that isspace and similar aren't called with a negative argument. --- diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index c4354ab45a2..e011d352ffd 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -253,18 +253,18 @@ get_keyword (field, rest) { static char keyword[KEYWORD_SIZE]; register char *ptr; - register char c; + register int c; ptr = &keyword[0]; - c = *field++; + c = (unsigned char) *field++; if (isspace (c) || c == ':') return ((char *) NULL); *ptr++ = (islower (c) ? toupper (c) : c); - while (((c = *field++) != ':') && ! isspace (c)) + while (((c = (unsigned char) *field++) != ':') && ! isspace (c)) *ptr++ = (islower (c) ? toupper (c) : c); *ptr++ = '\0'; while (isspace (c)) - c = *field++; + c = (unsigned char) *field++; if (c != ':') return ((char *) NULL); *rest = field;