Skip to content

Commit 4ea32cf

Browse files
authored
empty message was send when a packet is created NetDataWriter.FromBytes with copy false (#417)
* position was 0 after using FromBytes
1 parent f3e5ca7 commit 4ea32cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LiteNetLib/Utils/NetDataWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static NetDataWriter FromBytes(byte[] bytes, bool copy)
4343
netDataWriter.Put(bytes);
4444
return netDataWriter;
4545
}
46-
return new NetDataWriter(true, 0) {_data = bytes};
46+
return new NetDataWriter(true, 0) {_data = bytes, _position = bytes.Length};
4747
}
4848

4949
/// <summary>

0 commit comments

Comments
 (0)