aboutsummaryrefslogtreecommitdiff
path: root/base/commandLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r--base/commandLine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index c34e4d43c0..a9116bf5f2 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -374,6 +374,12 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
// We defer checking whether this is a valid target to a later point.
return s;
} else {
+ // On MacOS X prior to 10.9 the OS is sometimes adding a -psn_X_XXXXXX argument (where X are digits)
+ // to pass the process serial number. We need to ignore it to avoid an error.
+#ifdef MACOSX
+ if (strncmp(s, "-psn_", 5) == 0)
+ continue;
+#endif
bool isLongCmd = (s[0] == '-' && s[1] == '-');