Skip to content

Commit 5ef726c

Browse files
committed
chore(pb): decode logic
1 parent c7b8829 commit 5ef726c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lagrange/utils/binary/protobuf/coder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def proto_decode(data: bytes, max_layer=-1) -> ProtoDecoded:
139139
elif wire_type == 2:
140140
value = reader.read_length_delimited()
141141

142-
if max_layer > 0 or max_layer < 0 and len(value) > 1:
142+
if max_layer != 0 and len(value) > 1:
143143
try: # serialize nested
144144
value = proto_decode(value, max_layer - 1).proto
145145
except Exception:

0 commit comments

Comments
 (0)