diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-03-12 01:27:25 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-03-12 01:27:25 -0700 |
commit | 9af5ed875659d596fcd5c84b7456ae4750cb3011 (patch) | |
tree | a6a18aa63bba32af28b1646377ac960e0522ca39 /src | |
parent | 4b05d72231e7653b1c4eee9ecf95758f7767764a (diff) | |
download | emacs-9af5ed875659d596fcd5c84b7456ae4750cb3011.tar.gz |
* buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/buffer.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 07cc8dac1b3..1ec148b30c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 diff --git a/src/buffer.c b/src/buffer.c index efb9a80f35d..1fea19b0d65 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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. |