diff options
Diffstat (limited to 'apt-pkg/cachefilter-patterns.cc')
-rw-r--r-- | apt-pkg/cachefilter-patterns.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc index 986faaf52..1f448dae9 100644 --- a/apt-pkg/cachefilter-patterns.cc +++ b/apt-pkg/cachefilter-patterns.cc @@ -106,8 +106,10 @@ std::unique_ptr<PatternTreeParser::Node> PatternTreeParser::parsePattern() skipSpace(); } + node->end = state.offset; if (sentence[state.offset] != ')') - throw Error{*node, rstrprintf("Expected closing parenthesis, received %d", sentence[state.offset])}; + throw Error{node->arguments.empty() ? *node : *node->arguments[node->arguments.size() - 1], + rstrprintf("Expected closing parenthesis or comma after last argument, received %c", sentence[state.offset])}; node->end = ++state.offset; return node; |