mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 17:57:17 +00:00
Windows quick fix.
This commit is contained in:
parent
c43aaf8986
commit
1f30ea66e9
@ -274,6 +274,9 @@ static Janet os_execute(int32_t argc, Janet *argv) {
|
|||||||
janet_panic("expected at least 1 command line argument");
|
janet_panic("expected at least 1 command line argument");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Result */
|
||||||
|
int status = 0;
|
||||||
|
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
|
|
||||||
JanetBuffer *buf = os_exec_escape(exargs);
|
JanetBuffer *buf = os_exec_escape(exargs);
|
||||||
@ -302,7 +305,6 @@ static Janet os_execute(int32_t argc, Janet *argv) {
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
const char **child_argv = malloc(sizeof(char *) * (exargs.len + 1));
|
const char **child_argv = malloc(sizeof(char *) * (exargs.len + 1));
|
||||||
int status = 0;
|
|
||||||
if (NULL == child_argv) {
|
if (NULL == child_argv) {
|
||||||
JANET_OUT_OF_MEMORY;
|
JANET_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user