diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-10-10 15:11:52 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-10-10 15:11:52 +0200 |
| commit | c6cd9ceb759ae28c84bc203ea6989984d972ca91 (patch) | |
| tree | d1a362c24b6903df47d0af50296fbbc0a1bef677 /src | |
| parent | ce735357d61dcd446b7d219c56d365e3a35edeaf (diff) | |
| download | box64-c6cd9ceb759ae28c84bc203ea6989984d972ca91.tar.gz box64-c6cd9ceb759ae28c84bc203ea6989984d972ca91.zip | |
Fixed some command line handling regression
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c index 5ddc4231..8a72e009 100644 --- a/src/core.c +++ b/src/core.c @@ -1896,12 +1896,17 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf if(!strcmp(prog_, "wine-preloader") || !strcmp(prog_, "wine64-preloader")) { // wine-preloader detecter, skipping it if next arg exist and is an x86 binary int x64 = (nextarg<argc)?FileIsX64ELF(argv[nextarg]):0; - if(x64) { + #ifdef BOX32 + int x86 = (nextarg<argc)?FileIsX86ELF(argv[nextarg]):0; + #else + int x86 = 0; + #endif + if(x64 || x86) { prog = argv[++nextarg]; printf_log(LOG_INFO, "BOX64: Wine preloader detected, loading \"%s\" directly\n", prog); wine_preloaded = 1; prog_ = strrchr(prog, '/'); - if(!prog_) prog_ = prog; else ++prog; + if(!prog_) prog_ = prog; else ++prog_; } } #ifndef STATICBUILD |