Commit 9fb87016 authored by Damien Lefortier's avatar Damien Lefortier
Browse files

* src/tgbaalgos/ltl2taa.cc: Fix the previous patch.

parent 9cebcdc1
2010-01-18 Damien Lefortier <dam@lrde.epita.fr>
* src/tgbaalgos/ltl2taa.cc: Fix the previous patch.
2010-01-18 Damien Lefortier <dam@lrde.epita.fr>
* src/tgba/taatgba.cc, src/tgba/taatgba.hh: Fix memory issues
......
......@@ -231,9 +231,14 @@ namespace spot
void
visit(const multop* node)
{
bool ok = true;
std::vector<ltl2taa_visitor> vs;
for (unsigned n = 0; n < node->size(); ++n)
{
vs.push_back(recurse(node->nth(n)));
if (vs[n].succ_.empty()) // Handle 0
ok = false;
}
init_ = node;
std::vector<succ_state>::iterator i;
......@@ -242,6 +247,8 @@ namespace spot
{
case multop::And:
{
if (!ok)
return;
std::vector<succ_state> p = all_n_tuples(vs);
for (unsigned n = 0; n < p.size(); ++n)
{
......@@ -397,9 +404,9 @@ namespace spot
new language_containment_checker(&b, false, false, false, false);
ltl2taa_visitor v(res, lcc, refined_rules);
f2->accept(v);
taa_tgba* taa = v.result(); // Careful: before the destroy!
f2->destroy();
delete lcc;
return v.result();
return taa;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment