aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index 4c6f7fe3eae..f5942a84da1 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2179,10 +2179,9 @@ bool-vector. IDX starts at 0. */)
2179 { 2179 {
2180 /* We must relocate the string data. */ 2180 /* We must relocate the string data. */
2181 ptrdiff_t nchars = SCHARS (array); 2181 ptrdiff_t nchars = SCHARS (array);
2182 unsigned char *str;
2183 USE_SAFE_ALLOCA; 2182 USE_SAFE_ALLOCA;
2183 unsigned char *str = SAFE_ALLOCA (nbytes);
2184 2184
2185 SAFE_ALLOCA (str, unsigned char *, nbytes);
2186 memcpy (str, SDATA (array), nbytes); 2185 memcpy (str, SDATA (array), nbytes);
2187 allocate_string_data (XSTRING (array), nchars, 2186 allocate_string_data (XSTRING (array), nchars,
2188 nbytes + new_bytes - prev_bytes); 2187 nbytes + new_bytes - prev_bytes);