Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Risoe.BINfileData2RLum.Analysis() deal with empty input objects #224

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Make Risoe.BINfileData2RLum.Analysis() deal with empty input objects #224

merged 1 commit into from
Sep 10, 2024

Conversation

mcol
Copy link
Contributor

@mcol mcol commented Sep 10, 2024

Before we were crashing because we were attempting to do the comparison object@METADATA[["RECTYPE"]][x] == 128 with x = 0, which would fail as the first half of the expression evaluates to integer(0) and cannot be used in comparisons.

Now, before we get there, we check if the input is empty, in which case we set directly the records of the output RLum.Analysis object to be an empty list.

If the input is empty, the records of the output RLum.Analysis object
should be an empty list too.
Copy link
Member

@RLumSK RLumSK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@RLumSK RLumSK merged commit c2bd9bd into R-Lum:dev_0.9.x Sep 10, 2024
10 checks passed
@mcol mcol deleted the issue_215 branch September 10, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants