diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-12 19:26:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-12 19:26:23 +0400 |
commit | 7c8f1eb04e0a23769c2d610ed965900e5426c11e (patch) | |
tree | 653859da0cc0d89eda1f5a1deb7ec8314988da86 /source/blender/editors | |
parent | 26f0f25c5a5a36874b35861da02a68541eda8941 (diff) |
text editor bugfix, selecting & moving the cursor on lines >256 chars long (was reallocing too little memory).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index a8335399a50..2e5bb4a63e0 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -111,8 +111,8 @@ static void flatten_string_append(FlattenString *fs, char c, int accum) nbuf= MEM_callocN(sizeof(*fs->buf)*fs->len, "fs->buf"); naccum= MEM_callocN(sizeof(*fs->accum)*fs->len, "fs->accum"); - memcpy(nbuf, fs->buf, fs->pos); - memcpy(naccum, fs->accum, fs->pos); + memcpy(nbuf, fs->buf, fs->pos * sizeof(*fs->buf)); + memcpy(naccum, fs->accum, fs->pos * sizeof(*fs->accum)); if(fs->buf != fs->fixedbuf) { MEM_freeN(fs->buf); |