aboutsummaryrefslogtreecommitdiffstats
path: root/ui.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui.go')
-rw-r--r--ui.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.go b/ui.go
index 886b4c3..7472dcd 100644
--- a/ui.go
+++ b/ui.go
@@ -46,7 +46,7 @@ func (ui UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
fn(ui.calc.stack)
} else if con := parseConstant(ui.calc.buffer); con != nil {
ui.calc.stack = append(ui.calc.stack, *con)
- } else if f, err := strconv.ParseFloat(ui.calc.buffer, 64); err != nil {
+ } else if f, err := strconv.ParseFloat(ui.calc.buffer, 64); err == nil {
ui.calc.stack = append(ui.calc.stack, f)
}
ui.calc.buffer = ""