- Fixed a bug in the pruning algorithm, where intruder runs were also

checked for agent lists, which is false.
This commit is contained in:
ccremers
2004-08-30 22:08:44 +00:00
parent b04bc86185
commit 5c90522c55
2 changed files with 33 additions and 14 deletions

View File

@@ -339,15 +339,22 @@ agentOfRunRole (const System sys, const int run, const Term role)
Termlist agents = sys->runs[run].agents;
/* TODO stupid reversed order, lose that soon */
agents = termlistForward (agents);
while (agents != NULL && roles != NULL)
if (agents != NULL)
{
if (isTermEqual (roles->term, role))
agents = termlistForward (agents);
while (agents != NULL && roles != NULL)
{
return agents->term;
if (isTermEqual (roles->term, role))
{
return agents->term;
}
agents = agents->prev;
roles = roles->next;
}
agents = agents->prev;
roles = roles->next;
}
else
{
error ("Agent list for run %i is empty, so agentOfRunRole is not usable.", run);
}
return NULL;
}