read_and_insert_process_output: Call 'prepare_to_modify_buffer' first

* src/process.c (read_and_insert_process_output): Call
'prepare_to_modify_buffer' before any insertions (bug#71452).
This commit is contained in:
Dmitry Gutov 2024-06-11 04:51:25 +03:00
parent f74f4089fd
commit 5a576069fc

View file

@ -6362,6 +6362,8 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf,
&opoint_byte);
/* Adapted from call_process. */
prepare_to_modify_buffer (PT, PT, NULL);
if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters))
&& ! CODING_MAY_REQUIRE_DECODING (process_coding))
{