X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/40b1517d56f509a5faebb5ab25988c1d2216e879..5ccfc5866447d36a9b5a05f7f3b103f53137ac72:/Trampoline.t.cpp diff --git a/Trampoline.t.cpp b/Trampoline.t.cpp index 1d7cf95..f8780bc 100644 --- a/Trampoline.t.cpp +++ b/Trampoline.t.cpp @@ -32,6 +32,8 @@ static _finline void dlset(Baton *baton, Type_ &function, const char *name, void baton->dlerror(); } +// XXX: where you find this needs to be relative to CoreFoundation (or something) +// XXX: this needs to check if the framework is under PrivateFrameworks instead #define Framework(framework) \ "/System/Library/Frameworks/" #framework ".framework/" #framework @@ -66,10 +68,12 @@ void *Routine(void *arg) { void (*CYHandleServer)(pid_t); dlset(baton, CYHandleServer, "CYHandleServer", handle); + if (CYHandleServer == NULL) { + baton->dlerror(); + return NULL; + } - if (CYHandleServer != NULL) - CYHandleServer(baton->pid); - + CYHandleServer(baton->pid); return NULL; }