From e767370d9013ae7f98c83a7e2e95f88ffd1a5652 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 14 Dec 2014 06:04:57 -0800 Subject: [PATCH] Fix 64-bit Cycript (32-bit was non-deterministic). --- LockScreen.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LockScreen.mm b/LockScreen.mm index c8b882f..826999c 100644 --- a/LockScreen.mm +++ b/LockScreen.mm @@ -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) -- 2.45.2