unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12679: 24.2.50; Can't font-at for the beginning of a string
@ 2012-10-19  9:52 Kazuhiro Ito
  2012-10-19 13:11 ` Kenichi Handa
  0 siblings, 1 reply; 5+ messages in thread
From: Kazuhiro Ito @ 2012-10-19  9:52 UTC (permalink / raw)
  To: 12679

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-30 18:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19  9:52 bug#12679: 24.2.50; Can't font-at for the beginning of a string Kazuhiro Ito
2012-10-19 13:11 ` Kenichi Handa
2012-10-20 12:19   ` martin rudalics
2012-10-30 11:45     ` Kenichi Handa
2012-10-30 18:49       ` martin rudalics

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).