* 5-10-2002
* Remove __isdigit and use new ctype.h version.
* Add conditional setting of QUAL_CHARS for size_t and ptrdiff_t.
+ *
+ * 8-16-2002
+ * Fix two problems that showed up with the python 2.2.1 tests; one
+ * involving %o and one involving %f.
*/
if (ppfs->conv_num == CONV_X) {
prefix_num = PREFIX_UPR_X;
}
- if ((ppfs->conv_num == CONV_o) && (numfill < slen)) {
+ if ((ppfs->conv_num == CONV_o) && (numfill <= slen)) {
numfill = ((*s == '0') ? 1 : slen + 1);
}
}
if (mode == 'f') {
round += exp;
+ if (round < -1) {
+ memset(buf, '0', MAX_DIGITS);
+ exp = -1;
+ round = -1;
+ }
}
s = buf;