aboutsummaryrefslogtreecommitdiffstats
path: root/ui.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2023-07-23 21:24:46 -0230
committerSam Anthony <sam@samanthony.xyz>2023-07-23 21:24:46 -0230
commit1743ab7e7f9a38acff10fb6593dbc2e2f8c6f7ab (patch)
treef08b29e57e5fb37c23bee507c706187322f1d609 /ui.go
parent3951f8c09b3f49253cf0d354df708069223d0316 (diff)
downloadpfc-1743ab7e7f9a38acff10fb6593dbc2e2f8c6f7ab.zip
fix typo in input parsing block
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 = ""