summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-16 09:42:01 +0100
committerGitHub <noreply@github.com>2022-02-16 09:42:01 +0100
commitdbb64e57052babdf2e85914007980f948e1addbc (patch)
tree099a7578b09506dbdce0af227b87d8f9360cb599
parentf6f1593db43219e337817463bc02ebce38d95838 (diff)
parent1262d331c0b516c76977f27a9633102ce5ca483d (diff)
Merge pull request #58174 from timothyqiu/vs-set-index-crash
-rw-r--r--modules/visual_script/visual_script_nodes.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index e7f4e542c1..e672267b00 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1784,10 +1784,7 @@ public:
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
bool valid;
- // *p_output[0] points to the same place as *p_inputs[2] so we need a temp to store the value before the change in the next line
- Variant temp = *p_inputs[2];
- *p_outputs[0] = *p_inputs[0];
- p_outputs[0]->set(*p_inputs[1], temp, &valid);
+ ((Variant *)p_inputs[0])->set(*p_inputs[1], *p_inputs[2], &valid);
if (!valid) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;