changeset 8486:52b7441e731b

(Fpos_visible_in_window_p): Do something reasonable if w->start is outside the buffer bounds.
author Richard M. Stallman <rms@gnu.org>
date Mon, 08 Aug 1994 10:14:32 +0000
parents 6e4b40c80021
children 0a77d1dbae03
files src/window.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Mon Aug 08 10:13:24 1994 +0000
+++ b/src/window.c	Mon Aug 08 10:14:32 1994 +0000
@@ -228,6 +228,10 @@
       if (posint > BUF_ZV (buf))
 	return Qnil;
 
+      /* w->start can be out of range.  If it is, do something reasonable.  */
+      if (top < BUF_BEGV (buf) || top > BUF_ZV (buf))
+	return Qnil;
+
       /* If that info is not correct, calculate afresh */
       posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0),
 				posint, height, 0,