Mercurial > emacs
changeset 87488:f53d1d3c813f
(get_char_property_and_overlay):
Signal error if POSITION is out of range in a buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 30 Dec 2007 13:42:05 +0000 |
parents | f40808e1706f |
children | 210f5ff283f6 |
files | src/textprop.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/textprop.c Sun Dec 30 03:36:05 2007 +0000 +++ b/src/textprop.c Sun Dec 30 13:42:05 2007 +0000 @@ -646,6 +646,10 @@ Lisp_Object *overlay_vec; struct buffer *obuf = current_buffer; + if (XINT (position) < BUF_BEGV (XBUFFER (object)) + || XINT (position) > BUF_ZV (XBUFFER (object))) + xsignal1 (Qargs_out_of_range, position); + set_buffer_temp (XBUFFER (object)); GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0);