Просмотр исходного кода

Fix bug in potentiallyUnwrapBoxedPointer:

Tanner Bennett лет назад: 6
Родитель
Сommit
492d2e49fe
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      Classes/Utility/FLEXRuntimeUtility.m

+ 5 - 0
Classes/Utility/FLEXRuntimeUtility.m

@@ -65,6 +65,11 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
     // we check to see if the pointer is of a valid object. If not,
     // we just display the NSValue.
     if (!returnsObjectOrClass) {
+        // Skip NSNumber instances
+        if ([returnedObjectOrNil isKindOfClass:[NSNumber class]]) {
+            return returnedObjectOrNil;
+        }
+        
         // Can only be NSValue since return type is not an object,
         // so we bail if this doesn't add up
         if (![returnedObjectOrNil isKindOfClass:[NSValue class]]) {