aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dxvk.c8
-rw-r--r--src/wine.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/src/dxvk.c b/src/dxvk.c
index ffe9262..9b0a921 100644
--- a/src/dxvk.c
+++ b/src/dxvk.c
@@ -175,6 +175,14 @@ COMMAND(dxvk, install)
if (isFile(dxvkpath))
{
+ // quote the dxvkpath so whitespace won't cause trouble
+ {
+ char dxvkpathcpy[PATH_MAX] = {0};
+ strncat(dxvkpathcpy, "\"", sizeof(dxvkpathcpy) - strlen(dxvkpathcpy) - 1);
+ strncat(dxvkpathcpy, dxvkpath, sizeof(dxvkpathcpy) - strlen(dxvkpathcpy) - 1);
+ strncat(dxvkpathcpy, "\"", sizeof(dxvkpathcpy) - strlen(dxvkpathcpy) - 1);
+ strncpy(dxvkpath, dxvkpathcpy, sizeof(dxvkpathcpy));
+ }
strncat(dxvkpath, " install", sizeof(dxvkpath) - strlen(dxvkpath) - 1);
return system(dxvkpath);
diff --git a/src/wine.c b/src/wine.c
index c8680d0..d067ca6 100644
--- a/src/wine.c
+++ b/src/wine.c
@@ -233,6 +233,15 @@ COMMAND(wine, run)
if (isFile(winepath))
{
+ // quote the winepath so whitespace won't cause trouble
+ {
+ char winepathcpy[PATH_MAX] = {0};
+ strncat(winepathcpy, "\"", sizeof(winepathcpy) - strlen(winepathcpy) - 1);
+ strncat(winepathcpy, winepath, sizeof(winepathcpy) - strlen(winepathcpy) - 1);
+ strncat(winepathcpy, "\"", sizeof(winepathcpy) - strlen(winepathcpy) - 1);
+ strncpy(winepath, winepathcpy, sizeof(winepathcpy));
+ }
+
for (int i = 2; i < argc; ++i)
{
// make sure the passed arguments are in quotes so spaces don't cause problems