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 <ideasman42@gmail.com>2012-12-01 10:29:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-01 10:29:04 +0400
commit2f97f929a5dcb8b13aec528103ebe0db088aa696 (patch)
tree07d8c37306b788fba6b10fdefd6e391c2a4ad95a /source/blender/editors/space_console/console_draw.c
parenteb490f3aaebb92f3eae232cec3bbc5776d52104b (diff)
fix for bug in console indent, was not copying the null terminator.
also add assert to catch this case more quickly.
Diffstat (limited to 'source/blender/editors/space_console/console_draw.c')
-rw-r--r--source/blender/editors/space_console/console_draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index f19835b7f85..a215b476094 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -146,7 +146,8 @@ static int console_textview_line_get(struct TextViewContext *tvc, const char **l
ConsoleLine *cl = (ConsoleLine *)tvc->iter;
*line = cl->line;
*len = cl->len;
-
+ // printf("'%s' %d\n", *line, cl->len);
+ BLI_assert(cl->line[cl->len] == '\0' && (cl->len == 0 || cl->line[cl->len - 1] != '\0'));
return 1;
}