From d94b18819ad4ee3237c46ad43a962d0121f0c3fe Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 25 Apr 2014 17:31:17 +0200 Subject: ensure that expressions.eval(true) pops the brace "operator" test case: 1<()> * an empty brace (or content that does not leave anything on the stack) resulted in the brace op to be left on the stack which makes the op stack inconsistent --- TODO | 1 - src/expressions.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 98198ae..3a91a9d 100644 --- a/TODO +++ b/TODO @@ -7,7 +7,6 @@ Known Bugs: * Scintilla/Scinterm: sometimes indents too much (see e.g. state declarations) * adding a new buffer with syntax highlighting screws up styles: obviously they are attached to the view instead of the document - * crashes: 1<(C)> * reversing EWfilename$ (save as) does not work! * crashes on large files: S^EM^X$ (regexp: .*) diff --git a/src/expressions.cpp b/src/expressions.cpp index 03febf1..87785a7 100644 --- a/src/expressions.cpp +++ b/src/expressions.cpp @@ -176,9 +176,6 @@ Expressions::eval(bool pop_brace) gint n = first_op(); Operator op; - if (n < 2) - break; - op = operators.peek(n); if (op == OP_LOOP) break; @@ -187,6 +184,8 @@ Expressions::eval(bool pop_brace) pop_op(n); break; } + if (n < 2) + break; calc(); } -- cgit v1.2.3