diff options
author | David Robillard <d@drobilla.net> | 2012-03-20 06:16:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-20 06:16:12 +0000 |
commit | e6f61d105c1536f6821977f94927ef70f9bfe7d7 (patch) | |
tree | b442bc0dbd8fe1f5bae2652d8a580ca7bb5839fc /src/x11_in_gtk2.c | |
parent | 9f2a60b5461084bf2f1f0f84e5694f90b67d4873 (diff) | |
download | suil-e6f61d105c1536f6821977f94927ef70f9bfe7d7.tar.gz suil-e6f61d105c1536f6821977f94927ef70f9bfe7d7.tar.bz2 suil-e6f61d105c1536f6821977f94927ef70f9bfe7d7.zip |
Fix broken initialisation of features array.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4092 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/x11_in_gtk2.c')
-rw-r--r-- | src/x11_in_gtk2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index 0fae7a5..4ef06c9 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -115,14 +115,15 @@ suil_wrapper_new(SuilHost* host, wrapper->impl = wrap; wrapper->features = (LV2_Feature**)malloc( - sizeof(LV2_Feature) * (n_features + 1)); - memcpy(wrapper->features, features, sizeof(LV2_Feature) * n_features); + sizeof(LV2_Feature*) * (n_features + 2)); + memcpy(wrapper->features, features, sizeof(LV2_Feature*) * n_features); LV2_Feature* parent_feature = (LV2_Feature*)malloc(sizeof(LV2_Feature)); parent_feature->URI = NS_UI "parent"; parent_feature->data = (void*)(intptr_t)gtk_plug_get_id(wrap->plug); - wrapper->features[n_features] = parent_feature; + wrapper->features[n_features] = parent_feature; + wrapper->features[n_features + 1] = NULL; return wrapper; } |