aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/core/conda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c
index 90c6ba1..12d1a30 100644
--- a/src/lib/core/conda.c
+++ b/src/lib/core/conda.c
@@ -513,7 +513,7 @@ int conda_setup_headless() {
continue;
}
const int cmd_fmt_len = snprintf(NULL, 0, cmd_fmt, item);
- snprintf(cmd + strlen(cmd), sizeof(cmd) - cmd_fmt_len, cmd_fmt, item);
+ snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd) - cmd_fmt_len, cmd_fmt, item);
if (i < total - 1) {
strncat(cmd, " ", sizeof(cmd) - strlen(cmd) - 1);
}
@@ -536,7 +536,7 @@ int conda_setup_headless() {
continue;
}
const int cmd_fmt_len = snprintf(NULL, 0, cmd_fmt, item);
- snprintf(cmd + strlen(cmd), sizeof(cmd) - cmd_fmt_len, cmd_fmt, item);
+ snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd) - cmd_fmt_len, cmd_fmt, item);
if (i < total - 1) {
strncat(cmd, " ", sizeof(cmd) - strlen(cmd) - 1);
}