History

m_option: fix parsing of OP_APPEND for string lists

While parsing through the separators, the OP_APPEND also needs to use 0 for the separator since it is supposed to be unescaped. This was missed in the code reorganization of d2c409c56b49252c85eefd340863fd59a36808d6. Keyvalue lists were unaffected because only OP_DELETE and OP_REMOVE use this code.

Dudemanguy committed 1 year ago

Commit 493cc871 parent 3717a531 file · +1 −1Browse files

Unified · Split

options/m_option.c+1−1
@@ -1408,7 +1408,7 @@ static char **separate_input_param(const m_option_t *opt, bstr param, · 1407 unmodified lines
1408 int *len, int op)1408 int *len, int op)
1409{1409{
1410 char separator = opt->priv ? *(char *)opt->priv : OPTION_LIST_SEPARATOR;1410 char separator = opt->priv ? *(char *)opt->priv : OPTION_LIST_SEPARATOR;
1411 if (op == OP_REMOVE)1411 if (op == OP_APPEND || op == OP_REMOVE)
1412 separator = 0; // specially handled1412 separator = 0; // specially handled
1413 struct bstr str = param;1413 struct bstr str = param;
1414 int n = *len;1414 int n = *len;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t