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.
This commit is contained in:
Niklas Carlsson 2024-10-31 13:00:24 +01:00
parent c9acdd2f1f
commit 18148e7add

View file

@ -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;
}