Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
librelaxisloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klemm, Carl Philipp
librelaxisloader
Commits
fddaed9e
Commit
fddaed9e
authored
8 months ago
by
Carl Philipp Klemm
Browse files
Options
Downloads
Patches
Plain Diff
handle empty spectra in rlx_get_all_spectra
parent
b57329d0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
relaxisloader.c
+4
-1
4 additions, 1 deletion
relaxisloader.c
with
4 additions
and
1 deletion
relaxisloader.c
+
4
−
1
View file @
fddaed9e
...
@@ -428,8 +428,11 @@ struct rlx_spectra** rlx_get_all_spectra(struct rlxfile* file, const struct rlx_
...
@@ -428,8 +428,11 @@ struct rlx_spectra** rlx_get_all_spectra(struct rlxfile* file, const struct rlx_
return
NULL
;
return
NULL
;
struct
rlx_spectra
**
out
=
malloc
(
sizeof
(
*
out
)
*
(
length
+
1
));
struct
rlx_spectra
**
out
=
malloc
(
sizeof
(
*
out
)
*
(
length
+
1
));
size_t
index
=
0
;
for
(
size_t
i
=
0
;
i
<
length
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
length
;
++
i
)
{
out
[
i
]
=
rlx_get_spectra
(
file
,
project
,
i
);
out
[
index
]
=
rlx_get_spectra
(
file
,
project
,
i
);
if
(
out
[
index
])
++
index
;
}
}
out
[
length
]
=
NULL
;
out
[
length
]
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment