summaryrefslogtreecommitdiff
path: root/vst/drumgizmo_vst.cc
diff options
context:
space:
mode:
Diffstat (limited to 'vst/drumgizmo_vst.cc')
-rw-r--r--vst/drumgizmo_vst.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/vst/drumgizmo_vst.cc b/vst/drumgizmo_vst.cc
index 4d3ce9f..8a24a0f 100644
--- a/vst/drumgizmo_vst.cc
+++ b/vst/drumgizmo_vst.cc
@@ -132,8 +132,13 @@ DrumGizmoVst::DrumGizmoVst(audioMasterCallback audioMaster)
canProcessReplacing();
isSynth();
- char id[] = "DGV5"; // Four bytes typecasted into an unsigned integer
- setUniqueID(*(unsigned int*)id);
+ union {
+ char cid[4];
+ unsigned int iid;
+ } id;
+
+ memcpy(id.cid, "DGV5", 4); // Four bytes typecasted into an unsigned integer
+ setUniqueID(id.iid);
// setUniqueID((unsigned int)time(NULL));