diff --git a/src/wrapper/clap/features.rs b/src/wrapper/clap/features.rs index f88d2d30..11e6f079 100644 --- a/src/wrapper/clap/features.rs +++ b/src/wrapper/clap/features.rs @@ -85,7 +85,19 @@ impl ClapFeature { ClapFeature::Stereo => "stereo", ClapFeature::Surround => "surround", ClapFeature::Ambisonic => "ambisonic", - ClapFeature::Custom(s) => s, + ClapFeature::Custom(s) => { + // Custom features must be prefixed with a namespace. We'll use `.split(':').all()` + // here instead of `.split_once()` in case the user for whatever reason uses more + // than one colon (which the docs don't say anything about, but uh yeah). + nih_debug_assert!( + s.contains(':') && s.split(':').all(|x| !x.is_empty()), + "'{s}' is not a valid feature, custom features must be namespaced (e.g. \ + 'nih:{s}')", + s = s + ); + + s + } } } }