Browse Source

Fix off by 20 bug in iterator

John Carr 16 năm trước cách đây
mục cha
commit
1a09e81cec
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      dulwich/pack.py

+ 1 - 1
dulwich/pack.py

@@ -462,7 +462,7 @@ class PackData(object):
         basename = map[raw_base:raw_base+20]
         uncomp, comp_len = read_zlib(map, raw_base+20, size)
         assert size == len(uncomp)
-        return type, (basename, uncomp), comp_len+raw_base
+        return type, (basename, uncomp), comp_len+raw_base+20
     else:
         uncomp, comp_len = read_zlib(map, raw_base, size)
         assert len(uncomp) == size