Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4998009a
Commit
4998009a
authored
Apr 06, 2014
by
Jacques Germishuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't lose our elements when calling git_vector_set()
parent
4c219cf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/vector.c
+4
-2
No files found.
src/vector.c
View file @
4998009a
...
...
@@ -327,8 +327,10 @@ int git_vector_resize_to(git_vector *v, size_t new_length)
int
git_vector_set
(
void
**
old
,
git_vector
*
v
,
size_t
position
,
void
*
value
)
{
if
(
git_vector_resize_to
(
v
,
position
+
1
)
<
0
)
return
-
1
;
if
(
position
+
1
>
v
->
length
)
{
if
(
git_vector_resize_to
(
v
,
position
+
1
)
<
0
)
return
-
1
;
}
if
(
old
!=
NULL
)
*
old
=
v
->
contents
[
position
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment