aboutsummaryrefslogtreecommitdiff
path: root/src/protobuf/wkt/field_mask_pb.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/protobuf/wkt/field_mask_pb.nim')
-rw-r--r--src/protobuf/wkt/field_mask_pb.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/protobuf/wkt/field_mask_pb.nim b/src/protobuf/wkt/field_mask_pb.nim
index 6cf4a10..4ca76f3 100644
--- a/src/protobuf/wkt/field_mask_pb.nim
+++ b/src/protobuf/wkt/field_mask_pb.nim
@@ -62,7 +62,10 @@ proc readgoogle_protobuf_FieldMask*(stream: ProtobufStream): google_protobuf_Fie
tag = readTag(stream)
wireType = getTagWireType(tag)
case getTagFieldNumber(tag)
+ of 0:
+ raise newException(InvalidFieldNumberError, "Invalid field number: 0")
of 1:
+ expectWireType(wireType, WireType.LengthDelimited)
addpaths(result, readString(stream))
else: skipField(stream, wireType)