Execute result pointer is now optional

fixed a bug where result could be filled with no executions

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40453
This commit is contained in:
David Anderson
2007-02-07 08:42:48 +00:00
parent 06fa51700f
commit 085264e837
2 changed files with 12 additions and 7 deletions
+11 -6
View File
@@ -391,15 +391,20 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
}
}
if (m_ExecType == ET_Event || m_ExecType == ET_Hook)
if (success)
{
cur_result = high_result;
} else if (m_ExecType == ET_Ignore) {
cur_result = 0;
if (m_ExecType == ET_Event || m_ExecType == ET_Hook)
{
cur_result = high_result;
} else if (m_ExecType == ET_Ignore) {
cur_result = 0;
}
if (result)
{
*result = cur_result;
}
}
*result = cur_result;
if (filter)
{
filter->OnExecuteEnd(&cur_result, success, failed);