Fix NetworkWriter.Position poperty overflow due to wrong type

#25 Open
Repository
UnityNetworking
Branch
2017.3
Repository
Networking
Branch
2017.3

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 
hg pull -r 2017.3 https://bitbucket.org/Nikussan/unitynetworking
Author
  1. Nikussan NA
Reviewers
Description

Found a problem when tried to serialize some data with size of about 42Kb , got negative Position in NetworkWriter after adding it and nothing was sent. Checked in sources - sending of buffer is skipped if Position is < 0 and Position property itself is of type short, while actual limit is 64Kb (so max should be ushort), so I had an integer overflow in Position. Changed type of property and some castings to it to ushort type.

Comments (0)