From 20774c0bc1911a526b8a79270fbb336d45360c45 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 29 May 2023 10:49:56 -0500 Subject: [PATCH] Remove trailing space in -p mode. --- toys/other/xxd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/xxd.c b/toys/other/xxd.c index a37b0e3e..502f3341 100644 --- a/toys/other/xxd.c +++ b/toys/other/xxd.c @@ -70,7 +70,7 @@ static void do_xxd(int fd, char *name) space -= printf("%02x", toybuf[FLAG(e) ? (i + TT.g - j) : i]); i++,j+=2; - if (TT.g && !(i%TT.g)) { + if (!FLAG(p) && TT.g && !(i%TT.g)) { putchar(' '); space--; j=1; -- 2.39.2