Skip to content

Commit

Permalink
Updated host-multiview with the same improvements that host-run got
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Aug 23, 2024
1 parent c16bfcf commit 44bd95e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/host-multiview.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdlib.h>
#include "uae_pragmas.h"

static const char __ver[40] = "$VER: Host-MultiView v1.0 (2021-09-17)";
static const char __ver[40] = "$VER: Host-MultiView v1.1 (2024-08-23)";

int print_usage()
{
Expand Down Expand Up @@ -37,8 +37,8 @@ int main(int argc, char *argv[])
}
else
{
strcat(command, "xdg-open");
strcat(command, " ");
strncat(command, "xdg-open", sizeof(command) - strlen(command) - 1);
strncat(command, " ", sizeof(command) - strlen(command) - 1);
}

for (int i = 1; i < argc; i++)
Expand All @@ -47,16 +47,20 @@ int main(int argc, char *argv[])
{
NativeDosOp((ULONG)0, (ULONG)lock, (ULONG)filename, (ULONG)100);
UnLock(lock);
strcat(command, filename);
strncat(command, "\"", sizeof(command) - strlen(command) - 1);
strncat(command, filename, sizeof(command) - strlen(command) - 1);
strncat(command, "\"", sizeof(command) - strlen(command) - 1);
memset(filename, '\0', 4095);
}
else
{
strcat(command, argv[i]);
strncat(command, "\"", sizeof(command) - strlen(command) - 1);
strncat(command, argv[i], sizeof(command) - strlen(command) - 1);
strncat(command, "\"", sizeof(command) - strlen(command) - 1);
}

if (i != argc - 1)
strcat(command, " ");
strncat(command, " ", sizeof(command) - strlen(command) - 1);
}

#ifdef DEBUG
Expand Down

0 comments on commit 44bd95e

Please sign in to comment.