mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[CALC]
Initialize next field. Fixes CID 11063 svn path=/trunk/; revision=50140
This commit is contained in:
parent
4d40fbf685
commit
866846bf8c
1 changed files with 3 additions and 2 deletions
|
@ -351,7 +351,7 @@ static void evalStack(calc_number_t *number)
|
||||||
} else {
|
} else {
|
||||||
push(op);
|
push(op);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ip.node.operation != RPN_OPERATOR_EQUAL && ip.node.operation != RPN_OPERATOR_PERCENT)
|
if(ip.node.operation != RPN_OPERATOR_EQUAL && ip.node.operation != RPN_OPERATOR_PERCENT)
|
||||||
|
@ -380,6 +380,7 @@ int exec_infix2postfix(calc_number_t *number, unsigned int func)
|
||||||
tmp.node.number = *number;
|
tmp.node.number = *number;
|
||||||
tmp.node.base = calc.base;
|
tmp.node.base = calc.base;
|
||||||
tmp.node.operation = func;
|
tmp.node.operation = func;
|
||||||
|
tmp.next = NULL;
|
||||||
|
|
||||||
push(&tmp);
|
push(&tmp);
|
||||||
|
|
||||||
|
@ -446,7 +447,7 @@ void flush_postfix()
|
||||||
while (!is_stack_empty())
|
while (!is_stack_empty())
|
||||||
pop();
|
pop();
|
||||||
/* clear prev and last typed operators */
|
/* clear prev and last typed operators */
|
||||||
calc.prev_operator =
|
calc.prev_operator =
|
||||||
calc.last_operator = 0;
|
calc.last_operator = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue