From: Jay Freeman (saurik) Date: Sun, 14 Dec 2014 14:04:57 +0000 (-0800) Subject: Fix 64-bit Cycript (32-bit was non-deterministic). X-Git-Tag: v0.9.4013^0 X-Git-Url: https://git.saurik.com/cydget.git/commitdiff_plain/e767370d9013ae7f98c83a7e2e95f88ffd1a5652 Fix 64-bit Cycript (32-bit was non-deterministic). --- 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)