ExprEngine; Fix uninitialized value FP in subfunction when argument is passed by value
This commit is contained in:
parent
6ec15b6d7b
commit
8653c4b3a9
|
@ -1578,8 +1578,11 @@ static ExprEngine::ValuePtr executeFunctionCall(const Token *tok, Data &data)
|
|||
const Scope *functionScope = function->functionScope;
|
||||
int argnr = 0;
|
||||
for (const Variable &arg: function->argumentList) {
|
||||
if (argnr < argValues.size())
|
||||
if (argnr < argValues.size()) {
|
||||
if (!arg.isReference())
|
||||
argValues[argnr] = translateUninitValueToRange(argValues[argnr], arg.valueType(), data);
|
||||
data.assignValue(function->functionScope->bodyStart, arg.declarationId(), argValues[argnr]);
|
||||
}
|
||||
// TODO default values!
|
||||
argnr++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue