Explode should not include the closing paren
This commit is contained in:
parent
8d49821fdd
commit
549d7d5218
|
@ -145,11 +145,10 @@ write_reg(char r, char *reg)
|
|||
char c, *cap = walk(reg);
|
||||
if(*reg == '(' && reg[1] != ')') { /* tuple */
|
||||
reg++;
|
||||
while(reg < cap) {
|
||||
while(reg < cap - 1) {
|
||||
while((c = *reg) && !spacer(c))
|
||||
*dst_++ = c, reg++;
|
||||
*dst_++ = ' ';
|
||||
*dst_++ = '(', reg++, depth++;
|
||||
*dst_++ = ' ', *dst_++ = '(', reg++, depth++;
|
||||
}
|
||||
} else /* token */
|
||||
while((c = *reg++) && !spacer(c))
|
||||
|
|
Loading…
Reference in New Issue