mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
bug-fix: crash on startup, when passing in single-parameter, command-line args
This commit is contained in:
parent
7a52abd378
commit
28206248d4
@ -432,12 +432,14 @@ int main(int argc, char **argv)
|
|||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
// Mac OS X likes to pass in various options of its own, when launching an app.
|
// Mac OS X likes to pass in various options of its own, when launching an app.
|
||||||
// Attempt to ignore these.
|
// Attempt to ignore these.
|
||||||
|
if (argv[i]) {
|
||||||
const char * mac_psn_prefix = "-psn_";
|
const char * mac_psn_prefix = "-psn_";
|
||||||
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) {
|
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) {
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
} else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) {
|
} else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) {
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user