From bbf2ff410b4d14967c929cef91ed741beca256b6 Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Tue, 2 Sep 2008 21:09:29 +0000 Subject: [PATCH] Fix some more gcc warnings. --- source/blender/src/drawtext.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index 0797a425f2a..daa2d52d485 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -328,12 +328,14 @@ void txt_format_line(SpaceText *st, TextLine *line, int do_next) { int len, i; /* Get continuation from previous line */ - if (line->prev && (fmt=line->prev->format)) { + if (line->prev && line->prev->format != NULL) { + fmt= line->prev->format; cont = fmt[strlen(fmt)+1]; /* Just after the null-terminator */ } else cont = 0; /* Get original continuation from this line */ - if (fmt=line->format) { + if (line->format != NULL) { + fmt= line->format; orig = fmt[strlen(fmt)+1]; /* Just after the null-terminator */ } else orig = 0xFF; @@ -405,7 +407,7 @@ void txt_format_line(SpaceText *st, TextLine *line, int do_next) { prev = 'b'; if (i>0) { while (i>1) { - *fmt = prev; *fmt++; *str++; + *fmt = prev; fmt++; str++; i--; } *fmt = prev;