Commit 62056764 authored by Jim Blandy's avatar Jim Blandy
Browse files

* intervals.c (set_point): Check for point out of bounds before

	checking for an empty interval tree.
parent 517b2e01
......@@ -1254,16 +1254,18 @@ set_point (position, buffer)
if (position == buffer->
/* Check this now, before checking if the buffer has any intervals.
That way, we can catch conditions which break this sanity check
whether or not there are intervals in the buffer. */
if (position > BUF_Z (buffer) || position < BUF_BEG (buffer))
abort ();
if (NULL_INTERVAL_P (buffer->intervals))
buffer-> = position;
/* Perhaps we should just change `position' to the limit. */
if (position > BUF_Z (buffer) || position < BUF_BEG (buffer))
abort ();
/* Position Z is really one past the last char in the buffer. */
if (position == BUF_ZV (buffer))
iposition = position - 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment