]> git.saurik.com Git - winterboard.git/commitdiff
Fixed the Emoji bug.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 15 Aug 2009 07:52:43 +0000 (07:52 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 15 Aug 2009 07:52:43 +0000 (07:52 +0000)
Library.mm
control

index 73c9ec3aadb41fa3ca3ae250eb807829e7db661b..3e9e6c92649c05eede63dae6f0a0f035dc4ea428 100644 (file)
@@ -1276,24 +1276,22 @@ MSHook(UIImage *, _UIImageWithName, NSString *name) {
         NSNumber *key([NSNumber numberWithInt:id]);
         UIImage *image = [UIImages_ objectForKey:key];
         if (image != nil)
-            return reinterpret_cast<id>(image) == [NSNull null] ? nil : image;
+            return reinterpret_cast<id>(image) == [NSNull null] ? _UISharedImageWithIdentifier(id) : image;
         if (NSString *path = $pathForFile$inBundle$(name, _UIKitBundle(), true)) {
             image = [[UIImage alloc] initWithContentsOfFile:path cache:true];
             if (image != nil)
                 [image autorelease];
         }
-        if (image == nil)
-            image = _UISharedImageWithIdentifier(id);
         [UIImages_ setObject:(image == nil ? [NSNull null] : reinterpret_cast<id>(image)) forKey:key];
-        return image;
+        return image == nil ? _UISharedImageWithIdentifier(id) : image;
     }
 }
 
 MSHook(UIImage *, _UIImageWithNameInDomain, NSString *name, NSString *domain) {
-    NSString *key = [NSString stringWithFormat:@"D:%zu%@%@", [domain length], domain, name];
-    UIImage *image = [PathImages_ objectForKey:key];
+    NSString *key([NSString stringWithFormat:@"D:%zu%@%@", [domain length], domain, name]);
+    UIImage *image([PathImages_ objectForKey:key]);
     if (image != nil)
-        return reinterpret_cast<id>(image) == [NSNull null] ? nil : image;
+        return reinterpret_cast<id>(image) == [NSNull null] ? __UIImageWithNameInDomain(name, domain) : image;
     if (Debug_)
         NSLog(@"WB:Debug: UIImageWithNameInDomain(\"%@\", \"%@\")", name, domain);
     if (NSString *path = $getTheme$([NSArray arrayWithObject:[NSString stringWithFormat:@"Domains/%@/%@", domain, name]])) {
@@ -1301,10 +1299,8 @@ MSHook(UIImage *, _UIImageWithNameInDomain, NSString *name, NSString *domain) {
         if (image != nil)
             [image autorelease];
     }
-    if (image == nil)
-        image = __UIImageWithNameInDomain(name, domain);
     [PathImages_ setObject:(image == nil ? [NSNull null] : reinterpret_cast<id>(image)) forKey:key];
-    return image;
+    return image == nil ? __UIImageWithNameInDomain(name, domain) : image;
 }
 
 MSHook(GSFontRef, GSFontCreateWithName, const char *name, GSFontSymbolicTraits traits, float size) {
diff --git a/control b/control
index dd794235321d78179fba0490915624689ade5e1d..18abfa0010695536f7ddb23bf8751893f64b4852 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: optional
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.2991-1
+Version: 0.9.2992-1
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2958-1), killall