From 9770525dba8b9f15a5e41bf281627b1843c2631a Mon Sep 17 00:00:00 2001 From: toml12953 Date: Thu, 21 Apr 2022 05:43:29 -0400 Subject: [PATCH] =?UTF-8?q?Pressing=20PI=20(Shift=20=C3=B7)=20should=20onl?= =?UTF-8?q?y=20lift=20the=20stack=20if=20the=20previous=20operation=20woul?= =?UTF-8?q?d=20allow=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #4 --- src/calc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calc.c b/src/calc.c index ea3ee7a..ac963bd 100644 --- a/src/calc.c +++ b/src/calc.c @@ -128,7 +128,9 @@ void process_cmd(char cmd){ ////////// case '/':{ if (IsShiftedUp){ - StackPtr--; + if (NoLift != 1){ + StackPtr--; + } pi_decn(); copy_decn(&stack(STACK_X), &AccDecn); } else {