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
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-04-07 08:43:23 +0300
committerCampbell Barton <campbell@blender.org>2022-04-07 08:45:20 +0300
commite2f4c4db8d6cbe4694c24d599e16ee3889871bdd (patch)
treea3be9aecfcac72e0ddaf45471b56a29900101ebf /source/blender/editors/space_text/text_ops.c
parentf49a736ff4023231483c7e535ca2a7f2869d641d (diff)
Cleanup: pass the buffer length into `txt_insert_buf`
Also remove redundant NULL check.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r--source/blender/editors/space_text/text_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index d4aac8dd57f..3f1483bbd03 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -921,7 +921,7 @@ static int text_paste_exec(bContext *C, wmOperator *op)
buf = new_buf;
}
- txt_insert_buf(text, buf);
+ txt_insert_buf(text, buf, buf_len);
text_update_edited(text);
MEM_freeN(buf);
@@ -3587,7 +3587,7 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
if (found) {
if (mode == TEXT_REPLACE) {
ED_text_undo_push_init(C);
- txt_insert_buf(text, st->replacestr);
+ txt_insert_buf(text, st->replacestr, strlen(st->replacestr));
if (text->curl && text->curl->format) {
MEM_freeN(text->curl->format);
text->curl->format = NULL;
@@ -3671,7 +3671,7 @@ static int text_replace_all(bContext *C)
ED_text_undo_push_init(C);
do {
- txt_insert_buf(text, st->replacestr);
+ txt_insert_buf(text, st->replacestr, strlen(st->replacestr));
if (text->curl && text->curl->format) {
MEM_freeN(text->curl->format);
text->curl->format = NULL;