Commit 566d432f authored by Adam Langley's avatar Adam Langley

asn1: marshal true as 255, not 1.

OS X, at least, appears to test |byte == 255|, not |byte != 0| to
establish if a bool is true or false.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4128064
parent 5626bd9e
...@@ -317,7 +317,7 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter ...@@ -317,7 +317,7 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter
switch v := value.(type) { switch v := value.(type) {
case *reflect.BoolValue: case *reflect.BoolValue:
if v.Get() { if v.Get() {
return out.WriteByte(1) return out.WriteByte(255)
} else { } else {
return out.WriteByte(0) return out.WriteByte(0)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment