summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-09-11 22:22:22 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-09-11 22:22:22 -0400
commit2ba8e0088836fa1bfec2bdd6c92159b7805c399d (patch)
treee9db3c787ebfef0bfada3c11b8fd6577b54c0e83 /src/fileio.c
parent393a301e80860e90ba0ba718d29a2d72bc00eff7 (diff)
downloademacs-2ba8e0088836fa1bfec2bdd6c92159b7805c399d.tar.gz
* src/fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index e48fd89d7cb..08be41f9fe4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3546,7 +3546,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
immediate_quit = 0;
/* If the file matches the buffer completely,
there's no need to replace anything. */
- if (same_at_start - BEGV_BYTE == end_offset)
+ if (same_at_start - BEGV_BYTE == end_offset - beg_offset)
{
emacs_close (fd);
specpdl_ptr--;