Commit 397bc8d897fa5ad3c6db911877370b125e3750cc

Vicent Marti 2014-08-26T17:45:07

Merge pull request #2535 from libgit2/cmn/unpack-offset pack: return the correct final offset

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/pack.c b/src/pack.c
index 22dbd56..b05aa91 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -744,7 +744,7 @@ cleanup:
 		git__free(obj->data);
 
 	if (elem)
-		*obj_offset = elem->offset;
+		*obj_offset = curpos;
 
 	git_array_clear(chain);
 	return error;