aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2013-08-14 14:47:05 +0200
committerLars Magne Ingebrigtsen2013-08-14 14:47:05 +0200
commit71530c97bfa0a2527f6b99ab2bc00865bc8699f2 (patch)
tree8d530432ad24ffacbe29a0e1853e2592af2e7ed5
parent5faf4899f09ea5a34b5a46cce132047a06de97d4 (diff)
downloademacs-71530c97bfa0a2527f6b99ab2bc00865bc8699f2.tar.gz
emacs-71530c97bfa0a2527f6b99ab2bc00865bc8699f2.zip
* decompress.c (unwind_decompress): Always restore point.
-rw-r--r--src/ChangeLog4
-rw-r--r--src/decompress.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c8a1de49d68..eeae85a888c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * decompress.c (unwind_decompress): Always restore point.
4
12013-08-14 Paul Eggert <eggert@cs.ucla.edu> 52013-08-14 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 * xdisp.c (cursor_type_changed): Now static. 7 * xdisp.c (cursor_type_changed): Now static.
diff --git a/src/decompress.c b/src/decompress.c
index c54a34e050e..b4e122c3ba8 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -95,12 +95,14 @@ unwind_decompress (void *ddata)
95 struct decompress_unwind_data *data = ddata; 95 struct decompress_unwind_data *data = ddata;
96 fn_inflateEnd (data->stream); 96 fn_inflateEnd (data->stream);
97 97
98 /* Delete any uncompressed data already inserted and restore point. */ 98 /* Delete any uncompressed data already inserted on error. */
99 if (data->start) 99 if (data->start)
100 { 100 del_range (data->start, PT);
101 del_range (data->start, PT); 101
102 SET_PT (data->old_point); 102 /* Put point where it was, or if the buffer has shrunk because the
103 } 103 compressed data is bigger than the uncompressed, at
104 point-max. */
105 SET_PT (min (data->old_point, ZV));
104} 106}
105 107
106DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, 108DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,