]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Library.mm
Match up Instance_callAsFunction_{toString,valueOf}.
[cycript.git] / ObjectiveC / Library.mm
index 6ebb7881e022ed24a243e7a31a3b0a2b54c37deb..973909930d5ab67544eff4c3b1c84a6dcc637917 100644 (file)
@@ -2302,14 +2302,14 @@ static JSValueRef Instance_callAsFunction_toString(JSContextRef context, JSObjec
         return NULL;
 
     Instance *internal(reinterpret_cast<Instance *>(JSObjectGetPrivate(_this)));
-
     id value(internal->GetValue());
+
     if (value == nil)
         return CYCastJSValue(context, "nil");
 
     CYPoolTry {
         // XXX: this seems like a stupid implementation; what if it crashes? why not use the CYONifier backend?
-        return CYCastJSValue(context, CYJSString(context, [internal->GetValue() description]));
+        return CYCastJSValue(context, CYJSString(context, [value description]));
     } CYPoolCatch(NULL)
 } CYCatch return /*XXX*/ NULL; }