* buffer.c (compare_overlays): Don't assume args differ (Bug#6830).

This commit is contained in:
Paul Eggert 2012-03-12 01:27:25 -07:00
parent 4b05d72231
commit 9af5ed8756
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
* buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
2012-03-12 Chong Yidong <cyd@gnu.org>
* eval.c (inhibit_lisp_code): Rename from

View file

@ -2868,7 +2868,9 @@ compare_overlays (const void *v1, const void *v2)
between "equal" overlays. The result can still change between
invocations of Emacs, but it won't change in the middle of
`find_field' (bug#6830). */
return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
if (XHASH (s1->overlay) != XHASH (s2->overlay))
return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
return 0;
}
/* Sort an array of overlays by priority. The array is modified in place.