diff options
Diffstat (limited to 'src/libexpr/parser.cc')
-rw-r--r-- | src/libexpr/parser.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/parser.cc b/src/libexpr/parser.cc index 2ca1cab4a..241a43734 100644 --- a/src/libexpr/parser.cc +++ b/src/libexpr/parser.cc @@ -115,7 +115,7 @@ static void checkAttrSets(ATerm e) ATermList formals; ATerm body, pos; if (matchFunction(e, formals, body, pos)) { - ATermMap names; + ATermMap names(ATgetLength(formals)); for (ATermIterator i(formals); i; ++i) { ATerm name; Expr deflt; @@ -131,13 +131,13 @@ static void checkAttrSets(ATerm e) ATermList bnds; if (matchAttrs(e, bnds)) { - ATermMap names; + ATermMap names(ATgetLength(bnds)); checkAttrs(names, bnds); } ATermList rbnds, nrbnds; if (matchRec(e, rbnds, nrbnds)) { - ATermMap names; + ATermMap names(ATgetLength(rbnds) + ATgetLength(nrbnds)); checkAttrs(names, rbnds); checkAttrs(names, nrbnds); } |