avoid raising spurious division-by-zero exception in printf
This commit is contained in:
@@ -200,7 +200,7 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
|
|||||||
char ebuf0[3*sizeof(int)], *ebuf=&ebuf0[3*sizeof(int)], *estr;
|
char ebuf0[3*sizeof(int)], *ebuf=&ebuf0[3*sizeof(int)], *estr;
|
||||||
|
|
||||||
pl=1;
|
pl=1;
|
||||||
if (y<0 || 1/y<0) {
|
if (signbit(y)) {
|
||||||
y=-y;
|
y=-y;
|
||||||
} else if (fl & MARK_POS) {
|
} else if (fl & MARK_POS) {
|
||||||
prefix+=3;
|
prefix+=3;
|
||||||
|
|||||||
Reference in New Issue
Block a user