update readme
[m6w6/ext-psi] / src / types / let_exp.c
index 55bf5769cbcc46bb9dcf1065d1cc85766baba30f..4ce32a2f028ea13ce77f7459b7c6287f841dcf37 100644 (file)
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *******************************************************************************/
 
-#include "php_psi_stdinc.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# include "php_config.h"
+#endif
 #include "data.h"
 #include "call.h"
 #include "calc.h"
@@ -243,9 +247,11 @@ void *psi_let_exp_exec(struct psi_let_exp *val, struct psi_decl_arg *darg,
                        struct psi_impl *impl = psi_call_frame_get_impl(frame);
                        struct psi_let_stmt *let_temp = psi_impl_get_let(impl, val->data.var);
                        struct psi_call_frame_symbol *temp_arg;
+                       impl_val *src;
 
                        temp_arg = psi_call_frame_fetch_symbol(frame, let_temp->exp->var);
-                       frame_sym->temp_val = *deref_impl_val(temp_arg->ptr, val->data.var);
+                       src = deref_impl_val(temp_arg->ptr, val->data.var);
+                       memcpy(&frame_sym->temp_val, src, psi_decl_var_get_size(let_temp->exp->var));
                }
                break;