diff --git a/aegisub/avisynth.h b/aegisub/avisynth.h
index 25a4b3d1b638fe03934d5bea4625203d88f5beda..6a7ba5eba030fd5e9d5ff2108402e77a1d594375 100644
--- a/aegisub/avisynth.h
+++ b/aegisub/avisynth.h
@@ -566,8 +566,9 @@ private:
     if (!init && IsClip() && clip)
       clip->Release();
     // make sure this copies the whole struct!
-    ((__int32*)this)[0] = ((__int32*)src)[0];
-    ((__int32*)this)[1] = ((__int32*)src)[1];
+    //((__int32*)this)[0] = ((__int32*)src)[0];
+    //((__int32*)this)[1] = ((__int32*)src)[1];
+	memcpy(this, src, sizeof(AVSValue));
   }
 };