diff --git a/templates/c++/lexer.cpp b/templates/c++/lexer.cpp index 1f281d0..4e9d5f6 100644 --- a/templates/c++/lexer.cpp +++ b/templates/c++/lexer.cpp @@ -10,7 +10,7 @@ namespace { //The automaton data unsigned char TRANS_IDX[256] = { {{#trans_idx}}{{trans}}, {{/trans_idx}} }; - State TABLE[{{num_states}}][{{num_transitions_per_state}}] = { {{#table}} + State TABLE[{{num_states}} - 1][{{num_transitions_per_state}}] = { {{#table}} { {{#row}} {{state}}, {{/row}} }, {{/table}} };