aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2025-07-12 12:23:58 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2025-07-12 12:24:27 -0400
commit142861730ea0b020438180bc4ce27091b65e2257 (patch)
treefe5f68c886d7c8c2559fb70b0b754695aed9ee91 /src/main.c
parentRemove unnecessary if statement (diff)
downloadcli-142861730ea0b020438180bc4ce27091b65e2257.zip
Remove unnecesary if statement and fix memset
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 9400b75..8337dc5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -61,7 +61,7 @@ int justify(size_t linebuffer_capacity, FILE *in, FILE *out) {
linebuffer_clear(lb);
linebuffer_append_word(lb, word);
}
- memset(word, 0, MAX_WORD_LENGTH + 2);
+ memset(word, 0, MAX_WORD_LENGTH + 1);
}
if (read_word_result == READ_WORD_ERR_READ) {
fprintf(stderr, "Error reading word\n");