]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
D: Fix handling of %% directive in format string parser.
authorBruno Haible <bruno@clisp.org>
Mon, 2 Jun 2025 00:19:23 +0000 (02:19 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 2 Jun 2025 00:19:23 +0000 (02:19 +0200)
* gettext-tools/src/format-d.c (parse_upto): Add matching FMTDIR_END also for
the %% directive.

gettext-tools/src/format-d.c

index da97724e221d8f2d5853495bfe29ab8ff1d548ad..0b1bd17903d07e9cc2b75fbc0ce06710e875c078 100644 (file)
@@ -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++;
         }
     }