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

Fix panic in removeEmptySeries if series is nil and xFilesFactor specified #112

Closed
carrieedwards opened this issue Sep 13, 2022 · 0 comments · Fixed by #113
Closed

Fix panic in removeEmptySeries if series is nil and xFilesFactor specified #112

carrieedwards opened this issue Sep 13, 2022 · 0 comments · Fixed by #113
Labels
bug Something isn't working

Comments

@carrieedwards
Copy link
Collaborator

Describe the bug
A panic has been observed when the removeEmptySeries function is passed a series that is nil/a length of 0, and an xFilesFactor has also been specified.

The panic occurs here:

args[0].XFilesFactor

Because args[0] is nil, trying to access the XFilesFactor setting results in runtime error: index out of range [0] with length 0.

To replicate, pass in a series that does not exist as an argument, as well as any xFilesFactor values:

removeEmptySeries(nonexistantSeries, 0.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant