From eb751e0f160bbc3031b8064bbbbde522c983d040 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 12 Jul 2025 17:21:35 -0700 Subject: [PATCH] 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) --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5