Bug 386 - *s field width specification for printf seems to loop
*s field width specification for printf seems to loop
Status: Closed FIXED
Product: Base System
Classification: Unclassified
Component: bin
Any Any
: Normal Affects Only Me
Assigned To: FreeBSD bugs mailing list
Depends on:
  Show dependency treegraph
Reported: 1995-05-06 18:50 UTC by jkh
Modified: 1995-05-06 18:50 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description jkh 1995-05-06 18:50:00 UTC
	Try this:  printf "%8*s" foobarblatt

	It will loop forever.  The man page would tend to indicate that it,
	or perhaps rather %*8s, should print the arg truncated to 8 characters.
	Either way, it shouldn't loop.

	See above.
Comment 1 Joerg Wunsch freebsd_committer 1995-05-07 08:04:22 UTC
State Changed
From-To: open->closed

Mostly pilot error; the syntax checking for the argument string has been 
made more strict with version 1.2 of printf.c, so "%*8s" is no longer 
considered to be a valid format string.