runtime: Fix printing -Inf

R=rsc
CC=golang-dev
https://golang.org/cl/1258044
This commit is contained in:
Evan Shaw 2010-06-01 14:08:15 -07:00 committed by Russ Cox
parent 0d64fa19f8
commit 69879f0414

View File

@ -200,12 +200,12 @@ void
write(fd, "NaN", 3);
return;
}
if(isInf(v, 0)) {
if(isInf(v, 1)) {
write(fd, "+Inf", 4);
return;
}
if(isInf(v, -1)) {
write(fd, "+Inf", 4);
write(fd, "-Inf", 4);
return;
}