Flush when pop f64

This commit is contained in:
Austen Adler 2021-05-08 11:00:55 -04:00
parent d839700437
commit 3fea650fed

View File

@ -398,6 +398,7 @@ impl Calculator {
}) })
} }
pub fn pop(&mut self) -> CalculatorResult<f64> { pub fn pop(&mut self) -> CalculatorResult<f64> {
self.flush_l()?;
let f = self.checked_get(0)?; let f = self.checked_get(0)?;
self.direct_state_change(CalculatorStateChange { self.direct_state_change(CalculatorStateChange {
pop: OpArgs::Unary(f), pop: OpArgs::Unary(f),