commit a034804a0f08538fac5dcdd1080c80b6b8686d00
parent 5bbdb4fa3bb7dd29111ccc57b51e758e2fe772a9
Author: Jacob R. Edwards <n/a>
Date: Tue, 27 Dec 2022 07:52:42 -0800
Handle quoted responses correctly in client
It was suppost to print the unquoted response if there was only one
word, and the raw response otherwise. The check to see if it was a
multi-word response did not work correctly on those whoose one and
only word was quoted (and wouldn't have worked correctly if the
server left whitespace at the end either).
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apc/apc.c b/apc/apc.c
@@ -54,7 +54,7 @@ printline(char *buf)
if (!word)
return 1;
- if (!buf)
+ if (!apfindquote(&buf, NULL))
status = puts(word) < 0;
else
status = puts(bufp) < 0;