summaryrefslogtreecommitdiff
path: root/src/pkg/json/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/decode.go')
-rw-r--r--src/pkg/json/decode.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/json/decode.go b/src/pkg/json/decode.go
index 6f768d4b8..3f6965009 100644
--- a/src/pkg/json/decode.go
+++ b/src/pkg/json/decode.go
@@ -588,7 +588,7 @@ func (d *decodeState) literal(v reflect.Value) {
v.Set(n)
case *reflect.FloatValue:
- n, err := strconv.AtofN(s, int(v.Type().Size()*8))
+ n, err := strconv.AtofN(s, v.Type().Bits())
if err != nil || v.Overflow(n) {
d.saveError(&UnmarshalTypeError{"number " + s, v.Type()})
break