1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/value-to-xml.cc b/src/libexpr/value-to-xml.cc
index c3f352cfbd05..e751fd300fdb 100644
--- a/src/libexpr/value-to-xml.cc
+++ b/src/libexpr/value-to-xml.cc
@@ -32,8 +32,10 @@ static void showAttrs(EvalState & state, bool strict, bool location,
Bindings & attrs, XMLWriter & doc, PathSet & context, PathSet & drvsSeen)
{
StringSet names;
+
foreach (Bindings::iterator, i, attrs)
names.insert(i->first);
+
foreach (StringSet::iterator, i, names) {
Attr & a(attrs[state.symbols.create(*i)]);
|