libexpr/parser: Fix small error position mistake

In one of the cases it pointed to the first instead of the second
occurence, which is a bit confusing

Change-Id: Ie508d1f84feb434708804d45aa8a9c8b1e3c5f69
This commit is contained in:
piegames
2025-11-24 19:16:27 +00:00
parent 6da3519297
commit 4ce8d809ea
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ inline void State::addAttr(ExprAttrs * attrs, AttrPath && attrPath, std::unique_
for (auto & ad : ae->attrs) {
auto j2 = jAttrs->attrs.find(ad.first);
if (j2 != jAttrs->attrs.end()) // Attr already defined in iAttrs, error.
return dupAttr(ad.first, j2->second.pos, ad.second.pos);
return dupAttr(ad.first, ad.second.pos, j2->second.pos);
if (ad.second.kind == ExprAttrs::AttrDef::Kind::InheritedFrom) {
auto & sel = dynamic_cast<ExprSelect &>(*ad.second.e);
auto & from = dynamic_cast<ExprInheritFrom &>(*sel.e);