gitbook icon indicating copy to clipboard operation
gitbook copied to clipboard

Incorrect usage of 'size' and 'N' in PackFile figure (?)

Open Byron opened this issue 14 years ago • 0 comments

In the chapter "The PackFile", the first figure for version 2 index files introduces the variable 'size' as amount of entries. When describing the blocks for sha and crc values, the last entry in the block is referred to as sha1[size] and crc[size] respectively. I believe it would be better to call it sha1[size-1] and crc[size-1] as the array indices start counting at 0. The same issue can be found when the variable 'N' refers to the amount of objects at a pack offset larger than 2^32 -1 bits, where the last entry of 64 bit offsets is referred to as 64b_offset[N], which should be 64b_offset[N-1] as the array indices start at 0.

Byron avatar Mar 09 '11 18:03 Byron