From 24cdb896d36c9c165d2e32cc681b2679534638b3 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 1 Dec 2021 16:47:00 +0100 Subject: [PATCH] Readd braces for single-line if This is misleading, especially because it's in a section of code where the other branches are using braces. --- src/tinyexpr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tinyexpr.cpp b/src/tinyexpr.cpp index ab91aba96..810b1e7e0 100644 --- a/src/tinyexpr.cpp +++ b/src/tinyexpr.cpp @@ -449,9 +449,9 @@ static te_expr *base(state *s) { case TOK_OPEN: next_token(s); ret = expr(s); - if (s->type == TOK_CLOSE) + if (s->type == TOK_CLOSE) { next_token(s); - else if (s->type != TOK_ERROR && s->type != TOK_END && s->error == TE_ERROR_NONE) { + } else if (s->type != TOK_ERROR && s->type != TOK_END && s->error == TE_ERROR_NONE) { s->type = TOK_ERROR; s->error = TE_ERROR_TOO_MANY_ARGS; } else if (s->type != TOK_ERROR || s->error == TE_ERROR_UNKNOWN) {