Closed larroy closed 10 years ago
I think you are confused. Understandable since the methods are so densely written. The tenth byte never enters the while loop, and is set during the return. If you look at the bit shift logic, for instance, you can see that allowing indexes higher than 63 would wipe the entire value.
if (i > 63) is not correct, should be 70
The max number of bytes in a 64 bit varint is 10.