diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-01 02:46:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-01 02:46:41 +0400 |
commit | 6af6c96e8541c2138f5784d8b2258437d048d095 (patch) | |
tree | 181866026c1aaa01f58eb45157d55cc321fb1110 /source/blender/editors | |
parent | edd63274557a8cbd362cc887436ecee307322098 (diff) |
fix for yet another off by one error in console code, could crash deleting words (but mostly it was hidden by guardedalloc), hopefully the last of this kind in console.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_console/console_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index a6379e6465f..c10ea96096f 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -570,7 +570,7 @@ static int console_delete_exec(bContext *C, wmOperator *op) (type == DEL_NEXT_CHAR) ? STRCUR_JUMP_NONE : STRCUR_JUMP_DELIM, true); stride = pos - ci->cursor; if (stride) { - memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - ci->cursor) + 1); + memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - (ci->cursor + stride)) + 1); ci->len -= stride; BLI_assert(ci->len >= 0); done = TRUE; |