Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
96a25ef9
Commit
96a25ef9
authored
May 25, 2017
by
Uwe Schulzweida
Browse files
Check parent array.
parent
7724defa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Samplegridicon.cc
View file @
96a25ef9
...
...
@@ -192,6 +192,11 @@ void compute_child(cellindex_type *cellindex1, cellindex_type *cellindex2)
{
int
ncells1
=
cellindex1
->
ncells
;
int
*
parent1
=
cellindex1
->
parent
;
{
int
i
;
for
(
i
=
0
;
i
<
ncells1
;
++
i
)
if
(
parent1
[
i
]
>=
0
)
break
;
if
(
i
==
ncells1
)
cdoAbort
(
"Missing parent index of %s!"
,
cellindex1
->
filename
);
}
int
*
idx1
=
(
int
*
)
Malloc
(
ncells1
*
sizeof
(
int
));
for
(
int
i
=
0
;
i
<
ncells1
;
++
i
)
idx1
[
i
]
=
i
;
for
(
int
i
=
1
;
i
<
ncells1
;
++
i
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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