diff options
-rw-r--r-- | editors/awk.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/editors/awk.c b/editors/awk.c index f7b8ef0d3..3594717b1 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -2348,17 +2348,19 @@ static char *awk_printf(node *n, size_t *len) | |||
2348 | s = f; | 2348 | s = f; |
2349 | while (*f && *f != '%') | 2349 | while (*f && *f != '%') |
2350 | f++; | 2350 | f++; |
2351 | c = *++f; | 2351 | if (*f) { |
2352 | if (c == '%') { /* double % */ | 2352 | c = *++f; |
2353 | slen = f - s; | 2353 | if (c == '%') { /* double % */ |
2354 | s = xstrndup(s, slen); | 2354 | slen = f - s; |
2355 | f++; | 2355 | s = xstrndup(s, slen); |
2356 | goto tail; | 2356 | f++; |
2357 | } | 2357 | goto tail; |
2358 | while (*f && !isalpha(*f)) { | 2358 | } |
2359 | if (*f == '*') | 2359 | while (*f && !isalpha(*f)) { |
2360 | syntax_error("%*x formats are not supported"); | 2360 | if (*f == '*') |
2361 | f++; | 2361 | syntax_error("%*x formats are not supported"); |
2362 | f++; | ||
2363 | } | ||
2362 | } | 2364 | } |
2363 | c = *f; | 2365 | c = *f; |
2364 | if (!c) { | 2366 | if (!c) { |