]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
boost-format: Accept null precision.
authorBruno Haible <bruno@clisp.org>
Sat, 21 Jun 2025 21:45:59 +0000 (23:45 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 21 Jun 2025 21:45:59 +0000 (23:45 +0200)
* gettext-tools/src/format-boost.c: Fix comment regarding the precision.
* gettext-tools/tests/format-boost-1: Add a test case with null precision.

gettext-tools/src/format-boost.c
gettext-tools/tests/format-boost-1

index f704772b97e0051d217c2c67d5e9d2beab1cc3bd..a55b1a0c92c5bb0f41ebc8b7309fb9c8fde7fd80 100644 (file)
@@ -49,7 +49,7 @@
            - optional: a width specification: '*' (reads an argument) or '*m$'
              or a nonempty digit sequence,
            - optional: a '.' and a precision specification: '*' (reads an
-             argument) or '*m$' or a nonempty digit sequence,
+             argument) or '*m$' or an optional nonempty digit sequence,
            - optional: any of the characters 'h', 'l', 'L',
            - if the directive started with '%|':
                an optional specifier and a final '|',
index 717a7962113a0db3f081e339165d13b1d85e83e9..0d98ee1d07114ef55270fe5b604389257d4ca343 100755 (executable)
@@ -160,6 +160,10 @@ cat <<\EOF > f-bo-1.data
 "abc%*0g"
 # Invalid: flags after width
 "abc%|*0g|"
+# Valid: null precision
+"abc%.f"
+# Valid: null precision
+"abc%|.f|"
 # Invalid: twice precision
 "abc%.4.2g"
 # Invalid: twice precision