mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-19 08:54:47 +00:00
fix: improve nested configuration field support
This fixes the parser introduced in https://github.com/falcosecurity/falco/pull/1792. Now, nested fields such as `arr[1].subval` are supported, whereas the parser used to recognize the `.` as an unexpected character. Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
@@ -168,6 +168,10 @@ private:
|
||||
int nodeIdx = std::stoi(key.substr(i + 1, close_param_idx - i - 1));
|
||||
ret.reset(ret[nodeIdx]);
|
||||
i = close_param_idx;
|
||||
if (i < key.size() - 1 && key[i + 1] == '.')
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user