diff --git a/lib/pathmatch.cpp b/lib/pathmatch.cpp index 9dd4ce2b120..47856d82145 100644 --- a/lib/pathmatch.cpp +++ b/lib/pathmatch.cpp @@ -113,7 +113,7 @@ bool PathMatch::match(const std::string &pattern, const std::string &path, const /* No match, try to backtrack */ if (!b.empty()) { - const auto &bp = b.top(); + const auto bp = b.top(); b.pop(); s.setpos(bp.first); t.setpos(bp.second);