internal/filedesc: fix parsing of enforce_utf8 option

Remove spurious negation.

Change-Id: I484fa6fecda85943cdedd96a6c6f0f2349f6bfee
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/188338
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
Damien Neil 2019-07-31 11:29:40 -07:00
parent 070c1010d9
commit 45f14b4bdc

View File

@ -497,7 +497,7 @@ func (fd *Field) unmarshalOptions(b []byte) {
fd.L1.IsWeak = wire.DecodeBool(v)
case FieldOptions_EnforceUTF8:
fd.L1.HasEnforceUTF8 = true
fd.L1.EnforceUTF8 = !wire.DecodeBool(v)
fd.L1.EnforceUTF8 = wire.DecodeBool(v)
}
default:
m := wire.ConsumeFieldValue(num, typ, b)