]> git.marmaro.de Git - mmh/commitdiff
corrected termination condition for fill character introduced in last version
authorGlenn Burkhardt <glenn@aoi.ultranet.com>
Tue, 30 Sep 2003 16:22:54 +0000 (16:22 +0000)
committerGlenn Burkhardt <glenn@aoi.ultranet.com>
Tue, 30 Sep 2003 16:22:54 +0000 (16:22 +0000)
sbr/fmt_scan.c

index 678153513238df3e00917200d4220586748a2b85..4365e350c39f8b1aae6bd457ebb089e0379cdcf7 100644 (file)
@@ -315,7 +315,7 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat)
                cp += n;
            } else n = 0;
            c = abs(fmt->f_width) - n;
-           for (; c && cp < ep; c--) *cp++ = fmt->f_fill;
+           for (; (c > 0) && (cp < ep); c--) *cp++ = fmt->f_fill;
            break;
 
        case FT_CHAR: