From bff3b935fb73468d3d1435a5366c6082449a46e9 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 16 Sep 2024 15:30:39 +0200 Subject: Better handling of argv[0] --- src/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core.c b/src/core.c index 2e91eef2..b89b7f76 100644 --- a/src/core.c +++ b/src/core.c @@ -2000,7 +2000,10 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf PrintCollection(&my_context->box64_path, "BOX64 BIN PATH"); // lets build argc/argv stuff printf_log(LOG_INFO, "Looking for %s\n", prog); - my_context->argv[0] = ResolveFileSoft(prog, &my_context->box64_path); + if(strchr(prog, '/')) + my_context->argv[0] = box_strdup(prog); + else + my_context->argv[0] = ResolveFileSoft(prog, &my_context->box64_path); // check if box86 is present { my_context->box86path = box_strdup(my_context->box64path); -- cgit 1.4.1