mirror of https://github.com/odrling/Aegisub
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:
parent
c57ab33467
commit
1cf34a15e7
|
@ -263,7 +263,7 @@ namespace ExpressionEngine {
|
||||||
|
|
||||||
static bool f_ifgtz(Stack &stack, void *data)
|
static bool f_ifgtz(Stack &stack, void *data)
|
||||||
{
|
{
|
||||||
if (stack.size() >= 2) {
|
if (stack.size() >= 3) {
|
||||||
double v1 = stack.back();
|
double v1 = stack.back();
|
||||||
stack.pop_back();
|
stack.pop_back();
|
||||||
double v2 = stack.back();
|
double v2 = stack.back();
|
||||||
|
@ -283,7 +283,7 @@ namespace ExpressionEngine {
|
||||||
|
|
||||||
static bool f_ifeqz(Stack &stack, void *data)
|
static bool f_ifeqz(Stack &stack, void *data)
|
||||||
{
|
{
|
||||||
if (stack.size() >= 2) {
|
if (stack.size() >= 3) {
|
||||||
double v1 = stack.back();
|
double v1 = stack.back();
|
||||||
stack.pop_back();
|
stack.pop_back();
|
||||||
double v2 = stack.back();
|
double v2 = stack.back();
|
||||||
|
|
Loading…
Reference in New Issue