summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
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 04962eee1df..f4537ba0fda 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2446,7 +2446,7 @@ If VISIT is non-nil, BEG and END must be nil.")
error ("maximum buffer size exceeded");
}
- if (NILP (visit))
+ if (NILP (visit) && total > 0)
prepare_to_modify_buffer (point, point);
move_gap (point);