bugfix with windows process spawn
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 26 May 2022 17:19:57 +0000 (12:19 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 26 May 2022 17:19:57 +0000 (12:19 -0500)
src/onyx_runtime.c

index 804dfc970fc71ea232440dedb3bfe612b97dd32b..412e6be8ad23eeacf04778230c0edc113f523b37 100644 (file)
@@ -635,8 +635,9 @@ ONYX_DEF(__process_spawn, (WASM_I32, WASM_I32, WASM_I32, WASM_I32, WASM_I32, WAS
             char *arg_str = ONYX_PTR(*(i32 *) (array_loc + i * 2 * POINTER_SIZE));
             i32   arg_len = *(i32 *) (array_loc + i * 2 * POINTER_SIZE + 4);
 
-            strncat(cmdLine, " ", 2047);
+            strncat(cmdLine, " \"", 2047);
             strncat(cmdLine, arg_str, arg_len);
+            strncat(cmdLine, "\"", 2047);
         }
 
         STARTUPINFOA startup;