diff --git a/src/gui/interact/gen-node-location-query.hpp b/src/gui/interact/gen-node-location-query.hpp index b01acec98..944436830 100644 --- a/src/gui/interact/gen-node-location-query.hpp +++ b/src/gui/interact/gen-node-location-query.hpp @@ -144,11 +144,11 @@ namespace interact { { size_t depth = 0; Rec const& node = drillDown (tree_, path, pos, depth); - if (pos != depth-1) + if (depth != pos) throw error::State(_Fmt{"unable to drill down to depth %d: " "element %s at pos %d in path %s is in " "contradiction to actual UI structure"} - % pos + % (pos+1) % (depth