GNU bug report logs - #12679
24.2.50; Can't font-at for the beginning of a string

Previous Next

Package: emacs;

Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>

Date: Fri, 19 Oct 2012 09:55:02 UTC

Severity: normal

Found in version 24.2.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kenichi Handa <handa <at> gnu.org>
To: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Cc: 12679 <at> debbugs.gnu.org
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
In article <87391an60a.wl%%xmue <at> d1.dion.ne.jp>, Kazuhiro Ito <kzhr <at> d1.dion.ne.jp> 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 <at> gnu.org




This bug report was last modified 12 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.