aboutsummaryrefslogtreecommitdiffstats
path: root/src/lv2_evbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lv2_evbuf.c')
-rw-r--r--src/lv2_evbuf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lv2_evbuf.c b/src/lv2_evbuf.c
index f19aac2..355cac2 100644
--- a/src/lv2_evbuf.c
+++ b/src/lv2_evbuf.c
@@ -110,9 +110,8 @@ lv2_evbuf_next(const LV2_Evbuf_Iterator iter)
}
LV2_Atom_Sequence* aseq = &iter.evbuf->buf;
- LV2_Atom_Event* aev =
- (LV2_Atom_Event*)((char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) +
- iter.offset);
+ const char* abuf = (const char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq);
+ const LV2_Atom_Event* aev = (const LV2_Atom_Event*)(abuf + iter.offset);
const uint32_t offset =
iter.offset + lv2_atom_pad_size(sizeof(LV2_Atom_Event) + aev->body.size);