summaryrefslogtreecommitdiff
path: root/src/pkg/json/encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/encode.go')
-rw-r--r--src/pkg/json/encode.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/json/encode.go b/src/pkg/json/encode.go
index 8b0f78488..5d7ce35cb 100644
--- a/src/pkg/json/encode.go
+++ b/src/pkg/json/encode.go
@@ -162,7 +162,7 @@ func (e *encodeState) reflectValue(v reflect.Value) {
e.WriteString(strconv.Uitoa64(v.Get()))
case *reflect.FloatValue:
- e.WriteString(strconv.FtoaN(v.Get(), 'g', -1, int(v.Type().Size()*8)))
+ e.WriteString(strconv.FtoaN(v.Get(), 'g', -1, v.Type().Bits()))
case *reflect.StringValue:
e.string(v.Get())