all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kazuhiro Ito <kzhr@d1.dion.ne.jp>
To: 12679@debbugs.gnu.org
Subject: bug#12679: 24.2.50; Can't font-at for the beginning of a string
Date: Fri, 19 Oct 2012 18:52:21 +0900	[thread overview]
Message-ID: <87391an60a.wl%%xmue@d1.dion.ne.jp> (raw)

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);
     }


-- 
Kazuhiro Ito





             reply	other threads:[~2012-10-19  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  9:52 Kazuhiro Ito [this message]
2012-10-19 13:11 ` bug#12679: 24.2.50; Can't font-at for the beginning of a string Kenichi Handa
2012-10-20 12:19   ` martin rudalics
2012-10-30 11:45     ` Kenichi Handa
2012-10-30 18:49       ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87391an60a.wl%%xmue@d1.dion.ne.jp \
    --to=kzhr@d1.dion.ne.jp \
    --cc=12679@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.