Check for ?: register value before transform

This commit is contained in:
Devine Lu Linvega 2024-04-08 20:23:58 -07:00
parent 16a1617820
commit 21ec6b9e6a
1 changed files with 10 additions and 10 deletions

View File

@ -73,16 +73,16 @@ put_reg(char r)
char *s = regs[(int)r];
if(r == '*')
s = plode(s);
else if(r == ':') {
char *bb = walk(s);
if(*s == '(') s++, --bb;
while(s < bb) {
else if(s) {
char *ss = walk(s);
if(r == ':') {
if(*s == '(') s++, --ss;
while(s < ss) {
char c = *(s++);
if(c == '\\' && *(s++) == 'n') c = 0xa;
putc(c, stdout);
}
} else if(s) {
char *ss = walk(s);
} else
while((s < ss)) *outp_++ = *s++;
} else
*outp_++ = r;