1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 01:37:19 +00:00

Change behavior of empty env table passed to os/execute on windows.

This commit is contained in:
Calvin Rose 2021-02-14 11:21:50 -06:00
parent 60078e7950
commit 6713b23a65

View File

@ -210,7 +210,6 @@ static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
janet_buffer_push_bytes(temp, vals, janet_string_length(vals)); janet_buffer_push_bytes(temp, vals, janet_string_length(vals));
janet_buffer_push_u8(temp, '\0'); janet_buffer_push_u8(temp, '\0');
} }
if (temp->count == 0) return NULL;
janet_buffer_push_u8(temp, '\0'); janet_buffer_push_u8(temp, '\0');
char *ret = janet_smalloc(temp->count); char *ret = janet_smalloc(temp->count);
memcpy(ret, temp->data, temp->count); memcpy(ret, temp->data, temp->count);