提交 77625186 编写于 作者: R Rich Felker

avoid raising spurious division-by-zero exception in printf

上级 f321de9e
......@@ -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;
pl=1;
if (y<0 || 1/y<0) {
if (signbit(y)) {
y=-y;
} else if (fl & MARK_POS) {
prefix+=3;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册