Skip to content

DHooks: Fix changing of byref vector parameters#1772

Merged
peace-maker merged 1 commit intomasterfrom
dhooks_set_vector_param
May 31, 2022
Merged

DHooks: Fix changing of byref vector parameters#1772
peace-maker merged 1 commit intomasterfrom
dhooks_set_vector_param

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.

2 participants