Housekeeping

This commit is contained in:
Devine Lu Linvega 2024-04-12 09:56:07 -07:00
parent dfbb9c4fac
commit 8bdb791365
1 changed files with 4 additions and 4 deletions

View File

@ -134,12 +134,12 @@ commit_rule(Rule *r, char *s, int create)
static int
write_rule(Rule *r, char last, char *res)
{
char cc, *b = r->b, *origin = outp_;
while((cc = *b++))
if(spacer(last) && cc == '?')
char c, *b = r->b, *origin = outp_;
while((c = *b++))
if(spacer(last) && c == '?')
put_reg(*b++);
else
*outp_++ = cc, last = cc;
*outp_++ = c, last = c;
if(last == ' ' && outp_ - origin == 0) outp_--;
return commit_rule(r, res, 0);
}