diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-03-15 12:43:12 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-03-15 12:43:12 -0400 |
commit | 675bd05f0e57e54e00425a4f342a1c4103a08212 (patch) | |
tree | 3c2737bcd106734ccdf4f9ec06f42b20b9f46213 | |
parent | 4f02abda506190ca020f7758a2177aa6c5035c64 (diff) |
fix off-by-one on trailing whitespace trimmer
-rw-r--r-- | parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -65,7 +65,7 @@ struct command *sh_parse(const char *cmdline) start++; } - char *end = l + strlen(l); + char *end = l + strlen(l) - 1; while (isspace(*end) && end > start) { *end = '\0'; end--; |