Skip to content

Commit

Permalink
[endec] fix "hilarious" typo which causes asymmetric serialization in…
Browse files Browse the repository at this point in the history
… CodecUtils.toEndec
  • Loading branch information
gliscowo committed Jun 30, 2024
1 parent d66dcba commit 6ceae44
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static <T> Endec<T> toEndec(Codec<T> codec, PacketCodec<ByteBuf, T> packe
EdmEndec.INSTANCE.encode(ctx, serializer, codec.encodeStart(ops, value).getOrThrow(IllegalStateException::new));
},
(ctx, deserializer) -> {
if (deserializer instanceof ByteBufSerializer<?>) {
if (deserializer instanceof ByteBufDeserializer) {
var buffer = MinecraftEndecs.PACKET_BYTE_BUF.decode(ctx, deserializer);
return packetCodec.decode(buffer);
}
Expand Down

0 comments on commit 6ceae44

Please sign in to comment.