aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2018-08-23 22:51:21 +0100
committerNiall Sheridan <nsheridan@gmail.com>2018-08-24 13:45:03 +0100
commitf8e3dea19012ccf05965d10255789eec33c2ebcf (patch)
tree8522ceada8bc7270648f29615b89550db910cb6c /vendor/github.com/golang/protobuf/proto/table_unmarshal.go
parent91f9bc722152146466523861162b85195f99875b (diff)
Update deps
Diffstat (limited to 'vendor/github.com/golang/protobuf/proto/table_unmarshal.go')
-rw-r--r--vendor/github.com/golang/protobuf/proto/table_unmarshal.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
index de868ae..ebf1caa 100644
--- a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
+++ b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
@@ -175,10 +175,12 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
reqMask |= f.reqMask
continue
}
- if r, ok := err.(*RequiredNotSetError); ok && errLater == nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
// Remember this error, but keep parsing. We need to produce
// a full parse even if a required field is missing.
- errLater = r
+ if errLater == nil {
+ errLater = r
+ }
reqMask |= f.reqMask
continue
}