diff --git a/source/includes/lv2/atom-forge.h b/source/includes/lv2/atom-forge.h index 5a2935bab..ab9eeb399 100644 --- a/source/includes/lv2/atom-forge.h +++ b/source/includes/lv2/atom-forge.h @@ -296,7 +296,7 @@ lv2_atom_forge_raw(LV2_Atom_Forge* forge, const void* data, uint32_t size) if (forge->sink) { out = forge->sink(forge->handle, data, size); } else { - out = (LV2_Atom_Forge_Ref)((uint32_t)forge->buf + forge->offset); + out = (LV2_Atom_Forge_Ref)forge->buf + (LV2_Atom_Forge_Ref)forge->offset; uint8_t* mem = forge->buf + forge->offset; if (forge->offset + size > forge->size) { return 0;