Fixed off by one rule id

This commit is contained in:
Devine Lu Linvega 2024-04-29 09:54:37 -07:00
parent 4078919811
commit 8d207d42a5
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ rewrite(void)
} }
/* phase: define */ /* phase: define */
if(c == '<' && s[1] == '>') { if(c == '<' && s[1] == '>') {
r = rules_, r->id = rules_ - rules - 1; r = rules_, r->id = rules_ - rules;
s = parse_frag(&r->b, parse_frag(&r->a, s + 2)); s = parse_frag(&r->b, parse_frag(&r->a, s + 2));
if(*r->a) { if(*r->a) {
if(!quiet) fprintf(stderr, "<> (%s) (%s)\n", r->a, r->b); if(!quiet) fprintf(stderr, "<> (%s) (%s)\n", r->a, r->b);