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; } diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index bb46135545c..36716aeab95 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -444,7 +444,7 @@ static int console_indent_exec(bContext *C, wmOperator *UNUSED(op)) console_line_verify_length(ci, ci->len + len); - memmove(ci->line + len, ci->line, ci->len); + memmove(ci->line + len, ci->line, ci->len + 1); memset(ci->line, ' ', len); ci->len += len; BLI_assert(ci->len >= 0); diff --git a/source/gameengine/GamePlayer/common/bmfont.cpp b/source/gameengine/GamePlayer/common/bmfont.cpp index fe6f2187138..8ffbe757222 100644 --- a/source/gameengine/GamePlayer/common/bmfont.cpp +++ b/source/gameengine/GamePlayer/common/bmfont.cpp @@ -73,9 +73,6 @@ void printfGlyph(bmGlyph * glyph) } */ -#define MAX2(x,y) ( (x)>(y) ? (x) : (y) ) -#define MAX3(x,y,z) MAX2( MAX2((x),(y)) , (z) ) - void calcAlpha(ImBuf * ibuf) { int i;