m_option: reallow setting list options to no value to -clr them

d2c409c56b broke setting `--slang=` to
effectively `-clr` the option. Restore the behavior because scripts rely
on it.

Fixes: d2c409c56b
This commit is contained in:
llyyr
2025-01-30 05:10:05 +05:30
committed by Dudemanguy
parent 79e29787de
commit 72d976b3c1

View File

@@ -1417,7 +1417,7 @@ static char **separate_input_param(const m_option_t *opt, bstr param,
str = bstr_cut(str, 1);
n++;
}
if (n == 0)
if (n == 0 && op != OP_NONE)
return NULL;
char **list = talloc_array(NULL, char *, n + 2);