Fixes whitespace bug

This commit is contained in:
Devine Lu Linvega 2024-04-17 11:18:37 -07:00
parent 44e809f092
commit 88649fce12
1 changed files with 3 additions and 1 deletions

View File

@ -146,8 +146,10 @@ write_rule(Rule *r, char last, char *res)
put_reg(*b++);
else
*dst_++ = c, last = c;
if(dst_ == origin)
if(dst_ == origin) {
if(*res == ')') dst_--;
while(*res == ' ') res++;
}
return commit_rule(r, res, 0);
}