diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/commands.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 3 |
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; |