Skip to content

Commit 3ffb642

Browse files
mattstermillerMatthew Millerrayokota
authored
Fixes ProtobufSerializer's reversed list of message indexes (#2507)
Co-authored-by: Matthew Miller <[email protected]> Co-authored-by: Robert Yokota <[email protected]>
1 parent 0a1b1d8 commit 3ffb642

File tree

4 files changed

+1555
-0
lines changed

4 files changed

+1555
-0
lines changed

src/Confluent.SchemaRegistry.Serdes.Protobuf/ProtobufSerializer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ private static List<int> CreateIndexArray(MessageDescriptor md)
148148
throw new InvalidOperationException("MessageDescriptor not found.");
149149
}
150150

151+
// The indexes are built in reverse order, so reverse them to get the correct order
152+
indices.Reverse();
153+
151154
return indices;
152155
}
153156

0 commit comments

Comments
 (0)