Ensure enough space in attrset bindings when using both __overrides and dynamic attributes
(cherry picked from commit cd55f91ad2075d5ebb506950dfbc4161cab22db5)
This commit is contained in:
parent
195cc3f883
commit
59bbc31701
1 changed files with 1 additions and 1 deletions
|
@ -877,7 +877,7 @@ void ExprAttrs::eval(EvalState & state, Env & env, Value & v)
|
|||
if (hasOverrides) {
|
||||
Value * vOverrides = (*v.attrs)[overrides->second.displ].value;
|
||||
state.forceAttrs(*vOverrides);
|
||||
Bindings * newBnds = state.allocBindings(v.attrs->size() + vOverrides->attrs->size());
|
||||
Bindings * newBnds = state.allocBindings(v.attrs->capacity() + vOverrides->attrs->size());
|
||||
for (auto & i : *v.attrs)
|
||||
newBnds->push_back(i);
|
||||
for (auto & i : *vOverrides->attrs) {
|
||||
|
|
Loading…
Reference in a new issue