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

DHooks: Fix changing of byref vector parameters #1772

Merged
merged 1 commit into from
May 31, 2022

Conversation

peace-maker
Copy link
Member

We always created a new vector object instead of changing the passed in vector directly instead. This works for the function being called using our changed values - but the caller doesn't see the changed values if it's passing a vector by reference.

Only create a new vector if there isn't one being passed in and set the values directly in the passed in vector otherwise.

We always created a new vector object instead of changing the passed in vector directly instead. This works for the function being called using our changed values - but the caller doesn't see the change values if it's passing a vector by reference.

Only create a new vector if there isn't one being passed in and set the values directly in the passed in vector otherwise.
@peace-maker peace-maker merged commit c92354d into master May 31, 2022
@peace-maker peace-maker deleted the dhooks_set_vector_param branch May 31, 2022 12:55
psychonic pushed a commit that referenced this pull request Jun 24, 2022
We always created a new vector object instead of changing the passed in vector directly. This works for the function being called using our changed values - but the caller doesn't see the changed values if it's passing a vector by reference.

Only create a new vector if there isn't one being passed in and set the values directly in the passed in vector otherwise.
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.

None yet

2 participants