Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2018-09-19 05:11:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-19 06:31:55 +0300
commit39f7c8256d5812289010e2a4369ff3cc267ef55f (patch)
treeb4e840a5fe449f75fc3bb635de76915ea7f59066 /source
parentbb3ec3ebafbc2c0e5d8530148a433242e0adad30 (diff)
Fix unreported: Undo of texts pasted in the Text Editor misses one character.
Caused by commit rB28c34ae7e2d6 Unlike `strncpy`, `BLI_strncpy` ensures the last character is '\0'.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 76df163ee3a..fdc26fccda3 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1705,7 +1705,7 @@ static void txt_undo_add_blockop(Text *text, TextUndoBuf *utxt, int op, const ch
/* 4 bytes */
txt_undo_store_uint32(utxt->buf, &utxt->pos, length);
/* 'length' bytes */
- BLI_strncpy(utxt->buf + utxt->pos, buf, length);
+ memcpy(utxt->buf + utxt->pos, buf, length);
utxt->pos += length;
/* 4 bytes */
txt_undo_store_uint32(utxt->buf, &utxt->pos, length);