Fixed missing semicolons

Fixed default struct initialization because I write C++ normally
Fixed bug where uniproc_win64.c would not correctly append arguments to the command-line string
This commit is contained in:
2025-03-04 13:36:31 +11:00
parent 4df03647ba
commit f4927bf136
2 changed files with 6 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ uniproc_process uniproc_create_process(const char* cmd, const size_t num_args, c
for (size_t i = 0; i < num_args; ++i)
cmd_len += strlen(argv[i]) + 1;
char* p_cmd = malloc((cmd_len+1) * sizeof(char));
p_cmd[x] = ' ';
memcpy(p_cmd, cmd, x * sizeof(char));
x += 1; // Account for space after cmd
for (size_t i = 0; i < num_args; ++i)
@@ -51,7 +52,7 @@ uniproc_process uniproc_create_process(const char* cmd, const size_t num_args, c
size_t arglen = strlen(argv[i]);
memcpy(p_cmd + x, argv[i], arglen);
p_cmd[x + arglen] = ' ';
x += arglen + 1
x += arglen + 1;
}
p_cmd[cmd_len] = '\0';