diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2023-07-23 21:24:46 -0230 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2023-07-23 21:24:46 -0230 |
| commit | 1743ab7e7f9a38acff10fb6593dbc2e2f8c6f7ab (patch) | |
| tree | f08b29e57e5fb37c23bee507c706187322f1d609 | |
| parent | 3951f8c09b3f49253cf0d354df708069223d0316 (diff) | |
| download | pfc-1743ab7e7f9a38acff10fb6593dbc2e2f8c6f7ab.zip | |
fix typo in input parsing block
| -rw-r--r-- | ui.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 = "" |