emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1d70fbe 1/2: * src/alloc.c (resize_string_data): Adjust string by


From: Philipp Stephani
Subject: master 1d70fbe 1/2: * src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)
Date: Sat, 1 Aug 2020 15:04:02 -0400 (EDT)

branch: master
commit 1d70fbe4c83d6439716a054f6c074202c534a425
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    * src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)
---
 src/alloc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/alloc.c b/src/alloc.c
index 5b9c6e4..f203061 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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;
+#ifdef GC_CHECK_STRING_BYTES
+      SDATA_NBYTES (old_sdata) = new_nbytes;
+#endif
       new_charaddr = data + cidx_byte;
       memmove (new_charaddr + new_clen, new_charaddr + clen,
               nbytes - (cidx_byte + (clen - 1)));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]