Skip to content

Commit 39a5d81

Browse files
committed
fix decoding array item removals
1 parent a8ead8b commit 39a5d81

File tree

1 file changed

+2
-0
lines changed
  • Assets/Plugins/Colyseus/Serializer/Schema

1 file changed

+2
-0
lines changed

Assets/Plugins/Colyseus/Serializer/Schema/Schema.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,8 @@ public void Decode(byte[] bytes, Iterator it = null)
498498
// ensure current array has the same length as encoded one
499499
if (currentValue.Count > newLength)
500500
{
501+
numChanges -= currentValue.Count - newLength;
502+
501503
for (var i = newLength; i < currentValue.Count; i++)
502504
{
503505
var item = currentValue[i];

0 commit comments

Comments
 (0)