aboutsummaryrefslogtreecommitdiff
path: root/src/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.c')
-rw-r--r--src/strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings.c b/src/strings.c
index 29d5b65..017af26 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -236,7 +236,7 @@ char *join(char **arr, const char *separator) {
total_bytes += strlen(arr[i]);
records++;
}
- total_bytes += records * (strlen(separator) + 1);
+ total_bytes += (records * strlen(separator)) + 1;
result = (char *)calloc(total_bytes, sizeof(char));
for (int i = 0; i < records; i++) {