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

jrpc2: Fix a panic where a Type was reflected on a zero value #8

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

nepet
Copy link
Contributor

@nepet nepet commented Oct 13, 2022

We need to check on a zero value before we try to reflect the type of the value. Else golang will panic.
We do not set a value if the value is empty which results in the default value for the returned/passed struct. The implementer has to decide how to handle default values.

We need to check on a zero value before we try to reflect the type
of the value. Else golang will panic.
We do not set a value if the value is empty which results in the
default value for the returned/passed struct. The implementer has
to decide how to handle default values.
@nepet nepet requested a review from wtogami October 13, 2022 13:50
@wtogami wtogami merged commit 73978c8 into ElementsProject:master Oct 13, 2022
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