mirror of https://github.com/mgba-emu/mgba.git
Updater: Fix updating mGBA from a path with spaces on Windows
This commit is contained in:
parent
6b48b53356
commit
9cfa7120b1
|
@ -213,10 +213,14 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
mCoreConfigDeinit(&config);
|
||||
if (ok == 0) {
|
||||
const char* argv[] = { bin, NULL };
|
||||
#ifdef _WIN32
|
||||
char qbin[PATH_MAX + 2] = {0};
|
||||
// Windows is a bad operating system
|
||||
snprintf(qbin, sizeof(qbin), "\"%s\"", bin);
|
||||
const char* argv[] = { qbin, NULL };
|
||||
_execv(bin, argv);
|
||||
#elif defined(_POSIX_C_SOURCE) || defined(__APPLE__)
|
||||
const char* argv[] = { bin, NULL };
|
||||
execv(bin, argv);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue