]> git.saurik.com Git - cydget.git/commitdiff
Fix 64-bit Cycript (32-bit was non-deterministic). v0.9.4013
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 14 Dec 2014 14:04:57 +0000 (06:04 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 14 Dec 2014 14:04:57 +0000 (06:04 -0800)
LockScreen.mm

index c8b882f772fd05e251975978d84a90ba79cdf79b..826999cbb674a78c90039042c523b1693fefe849 100644 (file)
@@ -598,7 +598,13 @@ class CFStringStruct {
     {
     }
 
+    CFStringStruct(const CFStringStruct &value) :
+        value_((CFStringRef) CFRetain(value.value_))
+    {
+    }
+
     ~CFStringStruct() {
+        [*this autorelease];
     }
 
     operator CFStringRef() const {
@@ -630,7 +636,7 @@ static bool StringGet(const WebCore::String &string, const UChar *&data, size_t
         CFStringStruct cf((*_ZNK3WTF6String14createCFStringEv)(&string));
         data = (const UChar *) [cf cStringUsingEncoding:NSUTF16StringEncoding];
         length = CFStringGetLength(cf);
-        [cf autorelease];
+        return true;
     } else return false;
 
     if (data == NULL)