# HG changeset patch # User Richard M. Stallman # Date 776340872 0 # Node ID 52b7441e731b38f6ab68115bf323b1a8e347c1a7 # Parent 6e4b40c800218ac42d0414ff798138d661c12239 (Fpos_visible_in_window_p): Do something reasonable if w->start is outside the buffer bounds. diff -r 6e4b40c80021 -r 52b7441e731b src/window.c --- 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,