From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#12679: 24.2.50; Can't font-at for the beginning of a string Date: Fri, 19 Oct 2012 22:11:12 +0900 Message-ID: <87objywqrz.fsf@gnu.org> References: <87391an60a.wl%%xmue@d1.dion.ne.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1350652427 16218 80.91.229.3 (19 Oct 2012 13:13:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2012 13:13:47 +0000 (UTC) Cc: 12679@debbugs.gnu.org To: Kazuhiro Ito Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 15:13:54 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TPCOg-0003jH-5I for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 15:13:54 +0200 Original-Received: from localhost ([::1]:53580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPCOY-00036a-Sn for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2012 09:13:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPCOQ-0002mT-1p for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 09:13:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPCOK-0000U5-7w for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 09:13:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPCOK-0000U1-5P for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 09:13:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TPCPl-0004r1-K1 for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2012 09:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kenichi Handa Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Oct 2012 13:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12679 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12679-submit@debbugs.gnu.org id=B12679.135065249318634 (code B ref 12679); Fri, 19 Oct 2012 13:15:01 +0000 Original-Received: (at 12679) by debbugs.gnu.org; 19 Oct 2012 13:14:53 +0000 Original-Received: from localhost ([127.0.0.1]:51284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPCPd-0004qT-1L for submit@debbugs.gnu.org; Fri, 19 Oct 2012 09:14:53 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:41954 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPCPa-0004qM-Mh for 12679@debbugs.gnu.org; Fri, 19 Oct 2012 09:14:52 -0400 Original-Received: from 253.240.accsnet.ne.jp ([202.220.240.253]:56529 helo=mongkok) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TPCO7-0007AO-Fe; Fri, 19 Oct 2012 09:13:19 -0400 In-Reply-To: <87391an60a.wl%%xmue@d1.dion.ne.jp> (message from Kazuhiro Ito on Fri, 19 Oct 2012 18:52:21 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65736 Archived-At: In article <87391an60a.wl%%xmue@d1.dion.ne.jp>, Kazuhiro Ito writes: > The below code raises an error on trunk. > (font-at 0 nil "A") > Please see the below patch. > === modified file 'src/font.c' > --- src/font.c 2012-09-17 12:07:36 +0000 > +++ src/font.c 2012-10-19 09:15:58 +0000 > @@ -4775,7 +4775,7 @@ > { > CHECK_NUMBER (position); > CHECK_STRING (string); > - if (! (0 < XINT (position) && XINT (position) < SCHARS (string))) > + if (! (0 <= XINT (position) && XINT (position) < SCHARS (string))) > args_out_of_range (string, position); > pos = XINT (position); > } Thank you for the patch. I've just commited it. --- Kenichi Handa handa@gnu.org