From 3014b3d770fbbd54e25d2312b679f991512a348d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 26 Dec 2021 07:23:43 -0800 Subject: [PATCH] Clarify that C strings must be null-terminated --- doc/syntax.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/syntax.rst b/doc/syntax.rst index 832dadca..9d3cb57c 100644 --- a/doc/syntax.rst +++ b/doc/syntax.rst @@ -161,7 +161,8 @@ displayed after the decimal point for a floating-point value formatted with value formatted with ``'g'`` or ``'G'``. For non-number types the field indicates the maximum field size - in other words, how many characters will be used from the field content. The *precision* is not allowed for integer, -character, Boolean, and pointer values. +character, Boolean, and pointer values. Note that a C string must be +null-terminated even if precision is specified. The ``'L'`` option uses the current locale setting to insert the appropriate number separator characters. This option is only valid for numeric types.