Skip to content

Commit

Permalink
Тип ack bitfield в Java: int >>> long (всё ещё uint32!)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeGysssTaa committed May 6, 2021
1 parent e0f14ff commit 515540d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public class JavaCodeGenerator implements CodeGenerator {

private static final String WRAP_MTD_DECL
= "private static byte[] internalGeneratedWrap(Message packet, int sequence, int ack, int ackBitfield) {";
= "private static byte[] internalGeneratedWrap(Message packet, int sequence, int ack, long ackBitfield) {";

private static final String UNWRAP_MTD_DECL
= "private static UnwrappedPacketData internalGeneratedUnwrap(byte[] data) throws InvalidProtocolBufferException {";
Expand Down Expand Up @@ -105,9 +105,9 @@ public void appendGeneratedSourcesWrap(StringBuilder modifiedSrc, List<String> a
public void appendGeneratedSourcesUnrap(StringBuilder modifiedSrc, List<String> allPackets) {
modifiedSrc.append(" PacketWrapper wrapper = PacketWrapper.parseFrom(data);\n" +
"\n" +
" int sequence = wrapper.getSequence();\n" +
" int ack = wrapper.getAck();\n" +
" int ackBitfield = wrapper.getAckBitfield();\n" +
" int sequence = wrapper.getSequence();\n" +
" int ack = wrapper.getAck();\n" +
" long ackBitfield = wrapper.getAckBitfield();\n" +
"\n" +
" PacketWrapper.PacketCase packetType = wrapper.getPacketCase();\n" +
"\n" +
Expand Down

0 comments on commit 515540d

Please sign in to comment.