mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkIdentity.OnDeserializeSafely: use NetworkReader.Remaining
This commit is contained in:
parent
ccbd6185b4
commit
aa71d2a848
@ -997,7 +997,7 @@ internal void OnDeserializeAllSafely(NetworkReader reader, bool initialState)
|
||||
{
|
||||
// deserialize all components that were received
|
||||
NetworkBehaviour[] components = NetworkBehaviours;
|
||||
while (reader.Position < reader.Length)
|
||||
while (reader.Remaining > 0)
|
||||
{
|
||||
// read & check index [0..255]
|
||||
byte index = reader.ReadByte();
|
||||
|
Loading…
Reference in New Issue
Block a user