From 978b2014640ffff6d9a425ea1c78d093f5eaca6a Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 21 Nov 2022 18:27:44 -0500 Subject: [PATCH] Fixed segfault that could occur when pressing space --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 6e43976..df86e39 100644 --- a/main.go +++ b/main.go @@ -278,7 +278,7 @@ func insertGeneric (expression Expression) { operation, isOperation := selectedExpression.(*Operation) - if (isOperation && len(operation.operands) < 1) || parent == nil { + if isOperation && (len(operation.operands) < 1 || parent == nil) { // if we have an empty operation selected, always insert the // new expression into it operation.Adopt(expression)