From 0d1abaffb1ebd8e2e587212a8275865371feb4b0 Mon Sep 17 00:00:00 2001 From: Ken Thompson Date: Sun, 14 Sep 2008 16:57:55 -0700 Subject: methods on any type -- but only *struct tested R=r OCL=15326 CL=15326 --- src/runtime/print.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/runtime/print.c') 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); -- cgit v1.2.3