fix stack imbalance on error; RunExpression does this
This commit is contained in:
@@ -585,12 +585,7 @@ namespace
|
|||||||
if( EndsWith(sName, "Command") && sExpression.size() > 0 && sExpression[0] == '%' )
|
if( EndsWith(sName, "Command") && sExpression.size() > 0 && sExpression[0] == '%' )
|
||||||
{
|
{
|
||||||
sExpression.erase( 0, 1 );
|
sExpression.erase( 0, 1 );
|
||||||
if( !LuaHelpers::RunExpression(L, sExpression, sFile) )
|
LuaHelpers::RunExpression( L, sExpression, sFile );
|
||||||
{
|
|
||||||
/* Compiling or running failed. An error was already logged; just push a dummy
|
|
||||||
* return value. */
|
|
||||||
lua_pushnil( L );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( EndsWith(sName, "Command") && (sExpression.size() == 0 || sExpression[0] != '%') )
|
else if( EndsWith(sName, "Command") && (sExpression.size() == 0 || sExpression[0] != '%') )
|
||||||
{
|
{
|
||||||
@@ -604,12 +599,7 @@ namespace
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( !LuaHelpers::RunExpression(L, sExpression, sFile) )
|
LuaHelpers::RunExpression( L, sExpression, sFile );
|
||||||
{
|
|
||||||
/* Compiling or running failed. An error was already logged; just push a dummy
|
|
||||||
* return value. */
|
|
||||||
lua_pushnil( L );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete pValue;
|
delete pValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user