Adjust maxIndexOffset to include eofTrans. Use maxIndexOffset when picking the
[external/ragel.git] / rlgen-csharp / flatcodegen.cpp
index bf3ba24..ca3ce89 100644 (file)
@@ -625,7 +625,7 @@ void CSharpFlatCodeGen::writeData()
        }
 
        if ( redFsm->anyEofTrans() ) {
-               OPEN_ARRAY( ARRAY_TYPE(redFsm->maxIndex+1), ET() );
+               OPEN_ARRAY( ARRAY_TYPE(redFsm->maxIndexOffset+1), ET() );
                EOF_TRANS();
                CLOSE_ARRAY() <<
                "\n";