Better variable name
This commit is contained in:
parent
d838dc2129
commit
5dba8268e7
|
@ -2399,16 +2399,16 @@ static void execute(const Token *expr,
|
||||||
if (!expr->astOperand1() || expr->astOperand1()->varId() == 0U)
|
if (!expr->astOperand1() || expr->astOperand1()->varId() == 0U)
|
||||||
*error = true;
|
*error = true;
|
||||||
else {
|
else {
|
||||||
long long i;
|
long long intValue;
|
||||||
if (!programMemory->getIntValue(expr->astOperand1()->varId(), &i))
|
if (!programMemory->getIntValue(expr->astOperand1()->varId(), &intValue))
|
||||||
*error = true;
|
*error = true;
|
||||||
else {
|
else {
|
||||||
if (i == 0 &&
|
if (intValue == 0 &&
|
||||||
expr->str() == "--" &&
|
expr->str() == "--" &&
|
||||||
expr->astOperand1()->variable() &&
|
expr->astOperand1()->variable() &&
|
||||||
expr->astOperand1()->variable()->typeStartToken()->isUnsigned())
|
expr->astOperand1()->variable()->typeStartToken()->isUnsigned())
|
||||||
*error = true; // overflow
|
*error = true; // overflow
|
||||||
*result = i + (expr->str() == "++" ? 1 : -1);
|
*result = intValue + (expr->str() == "++" ? 1 : -1);
|
||||||
programMemory->setIntValue(expr->astOperand1()->varId(), *result);
|
programMemory->setIntValue(expr->astOperand1()->varId(), *result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue