Update calc.c

Pressing PI (Shift ÷) should only lift the stack if the previous operation would allow it.
This commit is contained in:
toml12953
2022-04-21 05:43:29 -04:00
committed by GitHub
parent 25db3835e0
commit d6e16f8bb9

View File

@ -128,7 +128,9 @@ void process_cmd(char cmd){
////////// //////////
case '/':{ case '/':{
if (IsShiftedUp){ if (IsShiftedUp){
StackPtr--; if (NoLift != 1){
StackPtr--;
}
pi_decn(); pi_decn();
copy_decn(&stack(STACK_X), &AccDecn); copy_decn(&stack(STACK_X), &AccDecn);
} else { } else {