On 4/17/20 4:38 PM, Sam Liddicott wrote: > So is it to be "fixed" in the documentation with a warning that > truncating-size specifiers for %q may nullify the safety benefits for which > it is used?
Probably something more general, along the lines of the POSIX language for the %b directive: "Bytes from the converted string shall be written until the end of the string or the number of bytes indicated by the precision specification is reached. If the precision is omitted, it shall be taken to be infinite, so all bytes up to the end of the converted string shall be written." The %b, %()T, and %q (and %s) directives all behave the same way: generate the argument and print it according to the supplied fieldwidth and precision. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/