From: Bruno Haible Date: Mon, 2 Jun 2025 00:19:23 +0000 (+0200) Subject: D: Fix handling of %% directive in format string parser. X-Git-Tag: v0.26~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7c6eeefd6a7894a16d3255bb19deb079a9301f9;p=thirdparty%2Fgettext.git D: Fix handling of %% directive in format string parser. * gettext-tools/src/format-d.c (parse_upto): Add matching FMTDIR_END also for the %% directive. --- diff --git a/gettext-tools/src/format-d.c b/gettext-tools/src/format-d.c index da97724e2..0b1bd1790 100644 --- a/gettext-tools/src/format-d.c +++ b/gettext-tools/src/format-d.c @@ -1714,7 +1714,7 @@ parse_upto (struct spec *spec, } if (*format == '%') /* A doubled percent-sign. */ - format++; + ; else { /* A directive. */ @@ -2123,11 +2123,11 @@ parse_upto (struct spec *spec, if (type & FAT_ELEMENTWISE) free_list (elementwise_list); + } - FDI_SET (format, FMTDIR_END); + FDI_SET (format, FMTDIR_END); - format++; - } + format++; } }