Selaa lähdekoodia

Use plain assignment rather than bh_memcpy_s (#3924)

James Ring 1 vuosi sitten
vanhempi
sitoutus
dbdf3df60b
1 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  1. 2 3
      core/iwasm/interpreter/wasm_runtime.c

+ 2 - 3
core/iwasm/interpreter/wasm_runtime.c

@@ -1208,9 +1208,8 @@ globals_instantiate(WASMModule *module, WASMModuleInstance *module_inst,
 
 
             /* The linked global instance has been initialized, we
             /* The linked global instance has been initialized, we
                just need to copy the value. */
                just need to copy the value. */
-            bh_memcpy_s(&(global->initial_value), sizeof(WASMValue),
-                        &(global_import->import_global_linked->init_expr.u),
-                        sizeof(WASMValue));
+            global->initial_value =
+                global_import->import_global_linked->init_expr.u;
         }
         }
         else
         else
 #endif
 #endif