lnobad / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

Assert off-by-1 error in ReadByte(int) #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use ReadByte(int numberOfBits) and pass in the value 8
2. An assert is triggered

What is the expected output? What do you see instead?
ReadByte(int) should be able to read up to a full byte.

What version of the product are you using? On what operating system?
Lidgren @ rev 248

Please provide any additional information below.
This is just a minor typo / off-by-1 error.

NetIncomingMessage.Read@Line:111:
-- NetException.Assert(numberOfBits > 0 && numberOfBits < 8);
++ NetException.Assert(numberOfBits > 0 && numberOfBits <= 8);

Original issue reported on code.google.com by jhill...@gmail.com on 21 Jun 2011 at 8:52

GoogleCodeExporter commented 9 years ago
Thanks, fixed in rev 249!

Original comment by lidg...@gmail.com on 22 Jun 2011 at 5:16