(%c): Count the character itself towards the field width in all cases.
authorroland <roland>
Sun, 5 Nov 1995 21:57:48 +0000 (21:57 +0000)
committerroland <roland>
Sun, 5 Nov 1995 21:57:48 +0000 (21:57 +0000)
stdio-common/vfprintf.c

index 63a5148..e22403b 100644 (file)
@@ -497,11 +497,9 @@ vfprintf (s, format, ap)
 
           case 'c':
             /* Character.  */
+           --specs[cnt].info.width;/* Account for the character itself.  */
             if (!specs[cnt].info.left)
-              {
-                --specs[cnt].info.width;
-                PAD (' ');
-              }
+             PAD (' ');
             outchar ((unsigned char) args_value[specs[cnt].data_arg].pa_char);
             if (specs[cnt].info.left)
               PAD (' ');