diff options
| author | tjg <tjg> | 2001-10-02 09:52:59 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:19 +0100 |
| commit | ebb96bbbc075c304c6f8cbf8c4d301a35fd64114 (patch) | |
| tree | 0a7d67cb054e82a1c3b95b68bfa4bbb53ee51cc0 /footobar.c | |
| parent | 361e9b464d51a935364eb00d6a2a9a3a5e57d868 (diff) | |
fix obscure quoting bug
Diffstat (limited to 'footobar.c')
| -rw-r--r-- | footobar.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -288,9 +288,11 @@ static bool Aconv(Format *f, int ignore) { /* %L -- print a list */ static bool Lconv(Format *f, int ignore) { - List *l, *n; + bool plain; char *sep; + List *l, *n; + plain = f->flags & FMT_leftside; l = va_arg(f->args, List *); sep = va_arg(f->args, char *); if (l == NULL && (f->flags & FMT_leftside) == 0) @@ -298,7 +300,7 @@ static bool Lconv(Format *f, int ignore) { else { for (; l != NULL; l = n) { n = l->n; - fmtprint(f, (f->flags & FMT_leftside) ? "%s" : "%-S", l->w); + fmtprint(f, plain ? "%s" : "%-S", l->w); if (n != NULL) fmtputc(f, *sep); } } |