Fix bug in 'ifgtz' and 'ifeqz' functions in RPN expression engine: they didn't check for the correct number of parameters, and caused a nasty crash as a result, if the number passed was wrong.

Originally committed to SVN as r1653.
This commit is contained in:
Niels Martin Hansen 2007-11-14 20:44:47 +00:00
parent c57ab33467
commit 1cf34a15e7
1 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ namespace ExpressionEngine {
static bool f_ifgtz(Stack &stack, void *data)
{
if (stack.size() >= 2) {
if (stack.size() >= 3) {
double v1 = stack.back();
stack.pop_back();
double v2 = stack.back();
@ -283,7 +283,7 @@ namespace ExpressionEngine {
static bool f_ifeqz(Stack &stack, void *data)
{
if (stack.size() >= 2) {
if (stack.size() >= 3) {
double v1 = stack.back();
stack.pop_back();
double v2 = stack.back();