projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8f99d1
)
* src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)
author
Philipp Stephani
<phst@google.com>
Sat, 1 Aug 2020 18:59:09 +0000
(20:59 +0200)
committer
Philipp Stephani
<phst@google.com>
Sat, 1 Aug 2020 19:02:33 +0000
(21:02 +0200)
src/alloc.c
patch
|
blob
|
history
diff --git
a/src/alloc.c
b/src/alloc.c
index 5b9c6e4eb1f96203267e6e4c5e5f7ec7db95bdbc..f203061161b89a1f2855210cd2eab383e81d0970 100644
(file)
--- 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)));