Fix binary search of v1 pack indices
Fix binary search of v1 pack indices

--- a/include/git/Pack.class.php
+++ b/include/git/Pack.class.php
@@ -173,7 +173,7 @@
 		 */
 		while ($low <= $high) {
 			$mid = ($low + $high) >> 1;
-			fseek($index, 4*256 + 24*$low);
+			fseek($index, 4*256 + 24*$mid);
 
 			$off = GitPHP_Pack::fuint32($index);
 			$binName = fread($index, 20);

comments