From: Jay Freeman (saurik) Date: Sun, 12 Jan 2014 08:00:44 +0000 (-0800) Subject: When casting function pointers, it's more complex. X-Git-Tag: v0.9.500~62 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/b48c91a5ac9059c56c948c663c5b471090491bd0?ds=sidebyside;hp=67110a156d28581856737ca3de13b4dbe4718288 When casting function pointers, it's more complex. --- diff --git a/Execute.cpp b/Execute.cpp index 25ab02b..7bf6c7d 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -1174,7 +1174,7 @@ static JSValueRef Type_callAsFunction(JSContextRef context, JSObjectRef object, Type_privateData *internal(reinterpret_cast(JSObjectGetPrivate(object))); if (internal->type_->primitive == sig::function_P) - return CYMakeFunctor(context, reinterpret_cast(static_cast(CYCastDouble(context, arguments[0]))), internal->type_->data.signature); + return CYMakeFunctor(context, arguments[0], internal->type_->data.signature); sig::Type *type(internal->type_); ffi_type *ffi(internal->GetFFI());