diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..83677d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +JKJALaunch.xcodeproj/project.xcworkspace/* +JKJALaunch.xcodeproj/xcuserdata/* \ No newline at end of file diff --git a/JKJALaunch-Info.plist b/JKJALaunch-Info.plist index 6ef1bed..8f18497 100644 --- a/JKJALaunch-Info.plist +++ b/JKJALaunch-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2 + 1.2.1 CFBundleSignature ???? CFBundleVersion - 9 + 10 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSMainNibFile diff --git a/patchapp.c b/patchapp.c index abb6447..42c9bb1 100644 --- a/patchapp.c +++ b/patchapp.c @@ -10,7 +10,8 @@ __attribute__ ((constructor)) void whichProgram( void ) { - unsigned char isMPText[3]; + char isMPText[3]; + char *envText; int isMP = 0; @@ -26,8 +27,13 @@ __attribute__ ((constructor)) void whichProgram( void ) mach_vm_protect(mach_task_self(), patchLocation, 2, 0, VM_PROT_EXECUTE | VM_PROT_READ); } - strncpy(isMPText, getenv("ASPYR_JAMP"), 3); - isMP = strncasecmp(isMPText, "NO", 3); + envText = getenv("ASPYR_JAMP"); + + if (envText != NULL) + { + strncpy(isMPText, envText, 3); + isMP = strncasecmp(isMPText, "NO", 3); + } //check if we're in a sandbox :/ then mess around with prefs a bit //hacked together with stuff from https://github.com/ole/NSBundle-OBCodeSigningInfo