From 4b238cf6c5ea1fc5076c91ce71c6537514e311db Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 16 Nov 2024 17:03:27 -0600 Subject: [PATCH] Don't output "length" byte at start of text replies. --- toys/net/host.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toys/net/host.c b/toys/net/host.c index c97e2ccb..6ead0286 100644 --- a/toys/net/host.c +++ b/toys/net/host.c @@ -162,9 +162,10 @@ void host_main(void) if (type==1 || type == 28) inet_ntop(type==1 ? AF_INET : AF_INET6, p, t2, t2len); else if (type==2 || type==5) xdn_expand(abuf, abuf+alen, p, t2, t2len); - else if (type==13 || type==16) + else if (type==13 || type==16) { + if (pllen && pllen-1==*p) p++, pllen--; sprintf(t2, "\"%.*s\"", minof(pllen, t2len), p); - else if (type==6) { + } else if (type==6) { ss = p+xdn_expand(abuf, abuf+alen, p, t2, t2len-1); j = strlen(t2); t2[j++] = ' '; -- 2.39.5