From 18148e7addf0369d5f14dc8eae2941a439afef1e Mon Sep 17 00:00:00 2001 From: Niklas Carlsson Date: Thu, 31 Oct 2024 13:00:24 +0100 Subject: [PATCH] filter-chain: fix unmap indexing for LV2 plugins The index returned to the LV2 plugin starts from 1, but the array index starts from 0. --- src/modules/module-filter-chain/lv2_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-filter-chain/lv2_plugin.c b/src/modules/module-filter-chain/lv2_plugin.c index 06b6ada5c..861a4a1a4 100644 --- a/src/modules/module-filter-chain/lv2_plugin.c +++ b/src/modules/module-filter-chain/lv2_plugin.c @@ -80,7 +80,7 @@ static const char *uri_table_unmap(LV2_URID_Map_Handle handle, LV2_URID urid) URITable *table = (URITable*)handle; if (urid > 0 && urid <= pw_array_get_len(&table->array, char*)) - return *pw_array_get_unchecked(&table->array, urid, char*); + return *pw_array_get_unchecked(&table->array, urid - 1, char*); return NULL; }