From c42054762530d2ca347078a8d70cd9eac379439d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Jan 2013 03:30:40 +0000 Subject: correction to last commit --- source/blender/editors/space_text/text_format_py.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_text') diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index cd9d45c5b0e..45a8b6bf646 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -233,7 +233,7 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_ne /* Deal with comments first */ if (*str == '#') { /* fill the remaining line */ - text_format_fill(&str, &fmt, prev, len - (int)(str - fs.buf)); + text_format_fill(&str, &fmt, FMT_TYPE_COMMENT, len - (int)(str - fs.buf)); } else if (*str == '"' || *str == '\'') { /* Strings */ @@ -259,8 +259,7 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_ne /* Booleans */ else if (prev != FMT_TYPE_DEFAULT && (i = txtfmt_py_find_bool(str)) != -1) { if (i > 0) { - memset(fmt, FMT_TYPE_NUMERAL, i); - i--; fmt += i; str += i; + text_format_fill(&str, &fmt, FMT_TYPE_NUMERAL, i); } else { str += BLI_str_utf8_size_safe(str) - 1; -- cgit v1.2.3