Fix some more gcc warnings.
authorKen Hughes <khughes@pacific.edu>
Tue, 2 Sep 2008 21:09:29 +0000 (21:09 +0000)
committerKen Hughes <khughes@pacific.edu>
Tue, 2 Sep 2008 21:09:29 +0000 (21:09 +0000)
source/blender/src/drawtext.c

index 0797a425f2a507376bbbf35f60157612f0ba966d..daa2d52d48558de365e2f060c61fe8b0a440916d 100644 (file)
@@ -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;