Commit 1d70fbe4 authored by Philipp Stephani's avatar Philipp Stephani

* src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)

parent a8f99d11
......@@ -1947,6 +1947,9 @@ resize_string_data (Lisp_Object string, ptrdiff_t cidx_byte,
/* No need to reallocate, as the size change falls within the
alignment slop. */
XSTRING (string)->u.s.size_byte = new_nbytes;
SDATA_NBYTES (old_sdata) = new_nbytes;
new_charaddr = data + cidx_byte;
memmove (new_charaddr + new_clen, new_charaddr + clen,
nbytes - (cidx_byte + (clen - 1)));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment