Revert previous, it is not the right change.

This commit is contained in:
nicm
2026-07-01 20:26:39 +00:00
parent 735bbf9da7
commit 8dc9e24c74

View File

@@ -4434,15 +4434,6 @@ format_build_modifiers(struct format_expand_state *es, const char **s,
struct format_modifier *list = NULL; struct format_modifier *list = NULL;
char c, last[] = "X;:", **argv, *value; char c, last[] = "X;:", **argv, *value;
int argc; int argc;
struct format_expand_state next;
/*
* Expand modifier arguments without time expansion so that any strftime
* specifiers are preserved for modifiers such as t/f to interpret; the
* final value is expanded with time later where appropriate.
*/
format_copy_state(&next, es, 0);
next.flags &= ~FORMAT_EXPAND_TIME;
/* /*
* Modifiers are a ; separated list of the forms: * Modifiers are a ; separated list of the forms:
@@ -4508,7 +4499,7 @@ format_build_modifiers(struct format_expand_state *es, const char **s,
argv = xcalloc(1, sizeof *argv); argv = xcalloc(1, sizeof *argv);
value = format_unescape(es, cp + 1, end - (cp + 1)); value = format_unescape(es, cp + 1, end - (cp + 1));
argv[0] = format_expand1(&next, value); argv[0] = format_expand1(es, value);
free(value); free(value);
argc = 1; argc = 1;
@@ -4532,7 +4523,7 @@ format_build_modifiers(struct format_expand_state *es, const char **s,
argv = xreallocarray(argv, argc + 1, sizeof *argv); argv = xreallocarray(argv, argc + 1, sizeof *argv);
value = format_unescape(es, cp, end - cp); value = format_unescape(es, cp, end - cp);
argv[argc++] = format_expand1(&next, value); argv[argc++] = format_expand1(es, value);
free(value); free(value);
cp = end; cp = end;