Fix rounding of 0xf for hex fp formats.

PR:	90333
This commit is contained in:
David Schultz 2007-01-03 04:57:58 +00:00
parent b1c00b13d6
commit ac9913a749
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165742
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ roundup(char *s0, int ndigits)
*s = 1;
return (1);
}
++*s;
*s = 0;
}
++*s;
return (0);

View File

@ -535,8 +535,8 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap)
static char zeroes[PADSIZE] =
{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
static const char xdigs_lower[17] = "0123456789abcdef?";
static const char xdigs_upper[17] = "0123456789ABCDEF?";
static const char xdigs_lower[16] = "0123456789abcdef";
static const char xdigs_upper[16] = "0123456789ABCDEF";
/*
* BEWARE, these `goto error' on error, and PAD uses `n'.