fix a spurious assertion

* src/twaalgos/totgba.cc: Here.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2015-08-14 14:13:57 +02:00
parent 0143f0d435
commit c50d5a82ac
2 changed files with 8 additions and 3 deletions

2
NEWS
View file

@ -24,6 +24,8 @@ New in spot 1.99.2a (not yet released)
escaping routine used by the two styles of LaTeX output was
slightly off. For instance ^ was incorrectly escaped, and the
double quotes where not always properly rendered.
- A spurious assertion was triggered by streett_to_generalized_buchi(),
but only when compiled in DEBUG mode.
New in spot 1.99.2 (2015-07-18)

View file

@ -166,6 +166,9 @@ namespace spot
bool sbacc = in->has_state_based_acc();
// States of the original automaton are marked with s.pend == -1U.
const acc_cond::mark_t orig_copy(-1U);
while (!todo.empty())
{
s = todo.front();
@ -187,7 +190,7 @@ namespace spot
bool maybe_acc = maybe_acc_scc && (scc_src == si.scc_of(t.dst));
if (pend != -1U)
if (pend != orig_copy)
{
if (!maybe_acc)
continue;
@ -239,7 +242,7 @@ namespace spot
// that only once per cycle. As an approximation, we
// only to that for transition where t.src >= t.dst as
// this has to occur at least once per cycle.
if (pend == -1U && (t.src >= t.dst) && maybe_acc && !no_fin)
if (pend == orig_copy && (t.src >= t.dst) && maybe_acc && !no_fin)
{
acc_cond::mark_t pend = 0U;
if (sbacc)
@ -273,7 +276,7 @@ namespace spot
// {
// std::cerr << s.second << " ("
// << s.first.s << ", ";
// if (s.first.pend == -1U)
// if (s.first.pend == orig_copy)
// std::cerr << "-)\n";
// else
// std::cerr << s.first.pend << ")\n";