diff options
Diffstat (limited to 'src/expressions.cpp')
-rw-r--r-- | src/expressions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expressions.cpp b/src/expressions.cpp index 6c28080..7ccdd31 100644 --- a/src/expressions.cpp +++ b/src/expressions.cpp @@ -124,11 +124,11 @@ Expressions::calc(void) Operator op; tecoInt vleft; - if (operators.peek() != OP_NUMBER) + if (!operators.items() || operators.peek() != OP_NUMBER) throw Error("Missing right operand"); vright = pop_num(); op = pop_op(); - if (operators.peek() != OP_NUMBER) + if (!operators.items() || operators.peek() != OP_NUMBER) throw Error("Missing left operand"); vleft = pop_num(); |