summaryrefslogtreecommitdiff
path: root/src/runtime/print.c
diff options
context:
space:
mode:
authorKen Thompson <ken@golang.org>2008-09-14 16:57:55 -0700
committerKen Thompson <ken@golang.org>2008-09-14 16:57:55 -0700
commit0d1abaffb1ebd8e2e587212a8275865371feb4b0 (patch)
tree42cbeaa77289969e35ee03ba4b3bedbaf98e4d88 /src/runtime/print.c
parent4addce79c48daab1c2f37236474d5804cbe37f22 (diff)
downloadgolang-0d1abaffb1ebd8e2e587212a8275865371feb4b0.tar.gz
methods on any type
-- but only *struct tested R=r OCL=15326 CL=15326
Diffstat (limited to 'src/runtime/print.c')
-rw-r--r--src/runtime/print.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/print.c b/src/runtime/print.c
index a2bed1967..8236f04b4 100644
--- a/src/runtime/print.c
+++ b/src/runtime/print.c
@@ -96,12 +96,13 @@ sys·printfloat(float64 v)
buf[1] = buf[2];
buf[2] = '.';
- buf[n+2] = '+';
+ buf[n+2] = 'e';
+ buf[n+3] = '+';
if(e < 0) {
e = -e;
- buf[n+2] = '-';
+ buf[n+3] = '-';
}
- buf[n+3] = 'e';
+
buf[n+4] = (e/10) + '0';
buf[n+5] = (e%10) + '0';
sys·write(1, buf, n+6);