]> granicus.if.org Git - re2c/commitdiff
Clarify which label is relevant to initial state.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 26 May 2015 11:34:57 +0000 (12:34 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 26 May 2015 11:34:57 +0000 (12:34 +0100)
(see commit 4ab969deca341820d03ffb979f023256b10c2f92)

re2c/src/codegen/emit_dfa.cc

index 3681e85df2dc011cf7058153a12f57fdec4e3429..a331cc28e424266ae922f8b47c33ba22468b488b 100644 (file)
@@ -195,7 +195,7 @@ void DFA::emit(Output & output, uint32_t& ind, const RegExpMap* specMap, const s
        }
 
        // The start_label is not always the first to be emitted, so we may have to jump. c.f. Initial::emit()
-       if (vUsedLabels.count(start_label+1))
+       if (vUsedLabels.count(head->label))
        {
                vUsedLabels.insert(start_label);
                o << indent(ind) << "goto " << labelPrefix << start_label << ";\n";