[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in printf
From: |
Oliver Kiddle |
Subject: |
bug in printf |
Date: |
Tue, 30 Oct 2001 13:55:47 +0000 |
The following result in seg faults:
/usr/bin/printf "%*s\n" -1 hello
/usr/bin/printf "%.*g\n" -1 .1
The negative width should, imply the `-' flag so, for example:
$ printf '%*sx\n' -3 x
x x
I would guess that you are calling printf(3) without the extra parameter
for the widths in these cases because negative values of a
width/precision internal variable are used to determine when a
width/precision has not been specified.
Bash's printf builtin has a similar problem with zero instead of
negative widths. I've sent them a separate report.
Please Cc me in any replies as I don't subscribe to this list.
Oliver Kiddle
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug in printf,
Oliver Kiddle <=