mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
m_config: add assertion to a specific case
It seems using multiple prefixes for an option isn't supported out of laziness (and shouldn't, because what the fuck). So assert() on this. (Unfortunately this prefix nonsense is still needed. Especially AO and VO options use this through the options_prefix field.)
This commit is contained in:
@@ -542,10 +542,12 @@ static void add_sub_group(struct m_config *config, const char *name_prefix,
|
||||
.parent_ptr = parent_ptr,
|
||||
};
|
||||
|
||||
if (subopts->prefix && subopts->prefix[0])
|
||||
name_prefix = subopts->prefix;
|
||||
if (!name_prefix)
|
||||
name_prefix = "";
|
||||
if (subopts->prefix && subopts->prefix[0]) {
|
||||
assert(!name_prefix[0]);
|
||||
name_prefix = subopts->prefix;
|
||||
}
|
||||
|
||||
for (int i = 0; subopts->opts && subopts->opts[i].name; i++) {
|
||||
const struct m_option *opt = &subopts->opts[i];
|
||||
|
||||
Reference in New Issue
Block a user