From 20b85c03e751b4876fa3c92040464e483172b746 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 19:03:11 +0200 Subject: manual format adjustment --- src/commands.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/commands.c') diff --git a/src/commands.c b/src/commands.c index 8cb81de..24d6c0d 100644 --- a/src/commands.c +++ b/src/commands.c @@ -23,8 +23,7 @@ int commands(buffer *b, struct commands *c) ++cmd.len; } - if (cmd.len > 0) - if (cmd.s[cmd.len - 1] == '\r') --cmd.len; + if (cmd.len > 0 && cmd.s[cmd.len - 1] == '\r') --cmd.len; cmd.s[cmd.len] = 0; -- cgit v1.2.3