From 5e165c1fad80f524585c190c8ad3bdcbe2a30549 Mon Sep 17 00:00:00 2001 From: snarmph Date: Tue, 21 Oct 2025 17:17:49 +0200 Subject: [PATCH] fixed errors in win32 implementation --- colla_win32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/colla_win32.c b/colla_win32.c index 6143460..f64e598 100644 --- a/colla_win32.c +++ b/colla_win32.c @@ -650,7 +650,7 @@ void os_set_env_var(arena_t scratch, strview_t key, strview_t value) { } str_t os_get_env_var(arena_t *arena, strview_t key) { - u8 tmpbuf[KB(1)]; + u8 tmpbuf[KB(10)]; arena_t scratch = arena_make(ARENA_STATIC, sizeof(tmpbuf), tmpbuf); wchar_t static_buf[1024] = {0}; @@ -720,7 +720,7 @@ oshandle_t os_run_cmd_async(arena_t scratch, os_cmd_t *cmd, os_cmd_options_t *op for (int i = 0; i < cur->count; ++i) { strview_t arg = cur->items[i]; if (strv_contains(arg, ' ')) { - ostr_print(&cmdline, "\"%v\"", arg); + ostr_print(&cmdline, "%v", arg); } else { ostr_puts(&cmdline, arg); @@ -733,7 +733,6 @@ oshandle_t os_run_cmd_async(arena_t scratch, os_cmd_t *cmd, os_cmd_options_t *op ostr_putc(&cmdline, '\0'); str_t cmd_str = ostr_to_str(&cmdline); - debug("(%v)", cmd_str); str16_t command = strv_to_str16(&scratch, strv(cmd_str)); WCHAR* env = (options && options->env) ? options->env->data : NULL;