Commit ae0ddc6f by Ben Straub

Merge pull request #1139 from ethomson/index_bugfix

don't walk off the end of the index
parents 6cacd44b e759b072
......@@ -957,13 +957,14 @@ int git_index_conflict_remove(git_index *index, const char *path)
continue;
}
error = git_vector_remove(&index->entries, (unsigned int)pos);
if ((error = git_vector_remove(&index->entries, (unsigned int)pos)) < 0)
return error;
if (error >= 0)
index_entry_free(conflict_entry);
index_entry_free(conflict_entry);
posmax--;
}
return error;
return 0;
}
static int index_conflicts_match(const git_vector *v, size_t idx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment