about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-07-23 13:23:03 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-07-23 13:23:03 +0200
commita908ce881d123b395bc2147a89f06fb79a68d605 (patch)
tree8dc8b8f291a73fae34da05da15231aac68761038 /src
parent49cc5eabcbcebdd6a67bfa32a82caf1723997d78 (diff)
downloadbox64-a908ce881d123b395bc2147a89f06fb79a68d605.tar.gz
box64-a908ce881d123b395bc2147a89f06fb79a68d605.zip
[BOX32] Use box64path instead of argv[0] in personality relaunch sequence (could have used execvpe instead)
Diffstat (limited to 'src')
-rw-r--r--src/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index c42de333..f98d3059 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1174,7 +1174,7 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
                     newenv[i] = box_strdup(env[i]);
                 newenv[nenv] = "BOX32_PERSONA32BITS=1";
                 // re-launch...
-                if(execve(argv[0], (void*)argv, newenv)<0)
+                if(execve(my_context->box64path, (void*)argv, newenv)<0)
                     printf_log(LOG_NONE, "Failed to relaunch. Error is %d/%s (argv[0]=\"%s\")\n", errno, strerror(errno), argv[0]);
             }
         }