summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 19:03:11 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 19:03:11 +0200
commit20b85c03e751b4876fa3c92040464e483172b746 (patch)
tree734fadbfdbc143ec4465093857f4c239448715e0 /src/commands.c
parenta6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff)
manual format adjustment
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c3
1 files changed, 1 insertions, 2 deletions
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;