X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom_lex_common.c;h=1eeab459d8e6c8c1579e19a8050ada9dee47fcc0;hb=cfb11211efa5a21c0f67bf75ed36b173f35c004c;hp=58296331b732313651202cf5042a1234097c3889;hpb=d38733b97417d5495142cf3a75d6e43d989a140a;p=gedcom-parse.git diff --git a/gedcom_lex_common.c b/gedcom_lex_common.c index 5829633..1eeab45 100644 --- a/gedcom_lex_common.c +++ b/gedcom_lex_common.c @@ -265,6 +265,10 @@ int test_loop(ENCODING enc, char* code) return CLOSE; \ } \ else { \ + /* Reset our state */ \ + current_level = -1; \ + level_diff = MAXGEDCLEVEL; \ + /* ... then terminate lex */ \ yyterminate(); \ } \ }