diff options
| author | Philipp Stephani | 2020-08-01 20:59:09 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2020-08-01 21:02:33 +0200 |
| commit | 1d70fbe4c83d6439716a054f6c074202c534a425 (patch) | |
| tree | cdd890b8ef1f88bd49dac2e10a14c3f5a9c03fc7 /src/alloc.c | |
| parent | a8f99d113c0556fd2860304ac7d7ff1c8f7c3ad4 (diff) | |
| download | emacs-1d70fbe4c83d6439716a054f6c074202c534a425.tar.gz emacs-1d70fbe4c83d6439716a054f6c074202c534a425.zip | |
* src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index 5b9c6e4eb1f..f203061161b 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1947,6 +1947,9 @@ resize_string_data (Lisp_Object string, ptrdiff_t cidx_byte, | |||
| 1947 | /* No need to reallocate, as the size change falls within the | 1947 | /* No need to reallocate, as the size change falls within the |
| 1948 | alignment slop. */ | 1948 | alignment slop. */ |
| 1949 | XSTRING (string)->u.s.size_byte = new_nbytes; | 1949 | XSTRING (string)->u.s.size_byte = new_nbytes; |
| 1950 | #ifdef GC_CHECK_STRING_BYTES | ||
| 1951 | SDATA_NBYTES (old_sdata) = new_nbytes; | ||
| 1952 | #endif | ||
| 1950 | new_charaddr = data + cidx_byte; | 1953 | new_charaddr = data + cidx_byte; |
| 1951 | memmove (new_charaddr + new_clen, new_charaddr + clen, | 1954 | memmove (new_charaddr + new_clen, new_charaddr + clen, |
| 1952 | nbytes - (cidx_byte + (clen - 1))); | 1955 | nbytes - (cidx_byte + (clen - 1))); |