diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 42abca62b9b9..d12783f474c6 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -155,8 +155,8 @@ cal(void) } /* Get rid of leading spaces (non-standard) */ - while (isspace(buf[0])) - memcpy(buf, buf + 1, strlen(buf) - 1); + while (isspace((unsigned char)buf[0])) + memcpy(buf, buf + 1, strlen(buf)); /* No tab in the line, then not a valid line */ if ((pp = strchr(buf, '\t')) == NULL)