From 819ea2f1fa0dea0c4100da7bd3d3c3e0599a7ad4 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 11 Apr 2024 09:54:31 -0700 Subject: [PATCH] Explode terminates in an empty list --- src/modal.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/modal.c b/src/modal.c index af1d47a..ec31827 100644 --- a/src/modal.c +++ b/src/modal.c @@ -43,12 +43,8 @@ plode(char *s) if(!depth) return s; } } else { /* explode */ - *outp_++ = *s++; - if(!spacer(*s)) *outp_++ = ' '; - while((c = *s++) && !spacer(c)) { - *outp_++ = '(', *outp_++ = c, depth++, c = *s; - if(!spacer(c)) *outp_++ = ' '; - } + while((c = *s++) && !spacer(c)) + *outp_++ = c, *outp_++ = ' ', *outp_++ = '(', depth++; for(i = 0; i < depth; i++) *outp_++ = ')'; }