diff options
author | David Robillard <d@drobilla.net> | 2012-05-18 21:12:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-18 21:12:46 +0000 |
commit | 338857fe5f2525f50c9105969d2b07cbc8415940 (patch) | |
tree | 1a4ae8e0e76ea542fa4b88c3d71e909d29f1e912 /lv2/lv2plug.in/ns/ext | |
parent | 7609432c51dfe706010a120b237390f0e8df659e (diff) | |
download | lv2-338857fe5f2525f50c9105969d2b07cbc8415940.tar.xz |
Fix lv2_atom_object_next() on 32-bit platforms.
Diffstat (limited to 'lv2/lv2plug.in/ns/ext')
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/atom.ttl | 2 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/util.h | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.ttl b/lv2/lv2plug.in/ns/ext/atom/atom.ttl index 546c7b8..e7ef5a8 100644 --- a/lv2/lv2plug.in/ns/ext/atom/atom.ttl +++ b/lv2/lv2plug.in/ns/ext/atom/atom.ttl @@ -27,6 +27,8 @@ dcs:changeset [ dcs:item [ rdfs:label "Fix implicit conversions in forge.h that are invalid in C++11." + ] , [ + rdfs:label "Fix lv2_atom_object_next() on 32-bit platforms." ] ] ] , [ diff --git a/lv2/lv2plug.in/ns/ext/atom/util.h b/lv2/lv2plug.in/ns/ext/atom/util.h index f07956b..6ba178c 100644 --- a/lv2/lv2plug.in/ns/ext/atom/util.h +++ b/lv2/lv2plug.in/ns/ext/atom/util.h @@ -204,10 +204,11 @@ lv2_atom_object_is_end(const LV2_Atom_Object_Body* body, static inline LV2_Atom_Property_Body* lv2_atom_object_next(const LV2_Atom_Property_Body* i) { - const LV2_Atom* const value = (LV2_Atom*)((uint8_t*)i + sizeof(i)); - return (LV2_Atom_Property_Body*)((uint8_t*)i - + sizeof(LV2_Atom_Property_Body) - + lv2_atom_pad_size(value->size)); + const LV2_Atom* const value = (LV2_Atom*)( + (uint8_t*)i + 2 * sizeof(uint32_t)); + return (LV2_Atom_Property_Body*)( + (uint8_t*)i + lv2_atom_pad_size(sizeof(LV2_Atom_Property_Body) + + value->size)); } /** |