summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-03 22:30:07 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-22 16:50:50 +0200
commit8842c75f172ed94be4ad11521d4083e97d740785 (patch)
treee864a71de4ec4745a57057541f5e5366a53c84cc /src/tree.c
parentc4e91d4500bdd357fbf7378bc10648a482513fa6 (diff)
downloadlibgit2-8842c75f172ed94be4ad11521d4083e97d740785.tar.gz
What has science done.
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c
index d2db84055..6ffb07c69 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -419,7 +419,9 @@ static int tree_parse_buffer(git_tree *tree, const char *buffer, const char *buf
int git_tree__parse(git_tree *tree, git_odb_object *obj)
{
assert(tree);
- return tree_parse_buffer(tree, (char *)obj->raw.data, (char *)obj->raw.data + obj->raw.len);
+ return tree_parse_buffer(tree,
+ (char *)obj->buffer,
+ (char *)obj->buffer + obj->cached.size);
}
static size_t find_next_dir(const char *dirname, git_index *index, size_t start)