aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-03 08:09:45 +0000
committerRichard M. Stallman1994-04-03 08:09:45 +0000
commitf8bdb8e6b2e9a958fa4363878ba0f75173ba7270 (patch)
tree074d4e5367da095677ab17630c37cfa148927f15 /src
parent839c7dfb06c6f0cff3e938870527b800a771e401 (diff)
downloademacs-f8bdb8e6b2e9a958fa4363878ba0f75173ba7270.tar.gz
emacs-f8bdb8e6b2e9a958fa4363878ba0f75173ba7270.zip
(note_mouse_highlight): Reject out-of-range pos value
before it causes an error.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 13ebd31e83e..5d22c27ae1e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1970,10 +1970,16 @@ note_mouse_highlight (f, x, y)
1970 Lisp_Object mouse_face, overlay, position; 1970 Lisp_Object mouse_face, overlay, position;
1971 Lisp_Object *overlay_vec; 1971 Lisp_Object *overlay_vec;
1972 int len, noverlays, ignor1; 1972 int len, noverlays, ignor1;
1973 struct buffer *obuf;
1974
1975 /* If we get an out-of-range value, return now;
1976 don't get an error. */
1977 if (pos > BUF_ZV (XBUFFER (w->buffer)))
1978 return;
1973 1979
1974 /* Make the window's buffer temporarily current for 1980 /* Make the window's buffer temporarily current for
1975 overlays_at and compute_char_face. */ 1981 overlays_at and compute_char_face. */
1976 struct buffer *obuf = current_buffer; 1982 obuf = current_buffer;
1977 current_buffer = XBUFFER (w->buffer); 1983 current_buffer = XBUFFER (w->buffer);
1978 1984
1979 /* Yes. Clear the display of the old active region, if any. */ 1985 /* Yes. Clear the display of the old active region, if any. */