From owner-svn-src-all@FreeBSD.ORG Thu May 6 16:37:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C2C9106566B; Thu, 6 May 2010 16:37:51 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2C76B8FC18; Thu, 6 May 2010 16:37:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46GbpxG029343; Thu, 6 May 2010 16:37:51 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46GbpIU029341; Thu, 6 May 2010 16:37:51 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201005061637.o46GbpIU029341@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 6 May 2010 16:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207701 - head/usr.bin/calendar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 16:37:51 -0000 Author: ache Date: Thu May 6 16:37:50 2010 New Revision: 207701 URL: http://svn.freebsd.org/changeset/base/207701 Log: Fix recent space skipping: 1) add missing (unsigned char) cast to ctype() macro 2) fix off-by-one error causing last letter always doubled Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Thu May 6 15:52:08 2010 (r207700) +++ head/usr.bin/calendar/io.c Thu May 6 16:37:50 2010 (r207701) @@ -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)