aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-04-25 17:31:17 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-08-02 11:08:03 +0200
commitd94b18819ad4ee3237c46ad43a962d0121f0c3fe (patch)
treee20cb5bf68323c618df7d426bf1e0dce791f0692
parentd90d3accdb574145a388e9d2825991a14c72960d (diff)
downloadsciteco-d94b18819ad4ee3237c46ad43a962d0121f0c3fe.tar.gz
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
-rw-r--r--TODO1
-rw-r--r--src/expressions.cpp5
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 <TAB> 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();
}