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:
Diffstat (limited to 'source/blender/blenkernel/intern/text.c')
-rw-r--r--source/blender/blenkernel/intern/text.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index a7e49dd7fc8..1197ec23907 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -2652,7 +2652,10 @@ void txt_backspace_char (Text *text)
} while (mrk && mrk->lineno==lineno);
}
- memcpy(text->curl->line + text->curc - c_len, text->curl->line + text->curc, text->curl->len-text->curc+1);
+ /* source and destination overlap, don't use memcpy() */
+ memmove(text->curl->line + text->curc - c_len,
+ text->curl->line + text->curc,
+ text->curl->len - text->curc + 1);
text->curl->len-= c_len;
text->curc-= c_len;