From: Paul Eggert Date: Sun, 13 Jul 2025 00:21:35 +0000 (-0700) Subject: insert-file-contents byte vs char confusion X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eb751e0f160bbc3031b8064bbbbde522c983d040;p=emacs.git insert-file-contents byte vs char confusion * src/fileio.c (Finsert_file_contents): Use del_range_byte, not del_range_1, since we are passing byte counts, not character counts. Problem reported by Pip Cet (Bug#77315). (cherry picked from commit 4c4f68be4b7506502c6a4b133b02bb34f097496d) --- diff --git a/src/fileio.c b/src/fileio.c index d7dd03db17e..70433f4d330 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4440,7 +4440,7 @@ by calling `format-decode', which see. */) clear_unwind_protect (fd_index); /* Truncate the buffer to the size of the file. */ - del_range_1 (same_at_start, same_at_end, 0, 0); + del_range_byte (same_at_start, same_at_end); goto handled; }