Explorar el Código

Fix bug in potentiallyUnwrapBoxedPointer:

Tanner Bennett hace 6 años
padre
commit
492d2e49fe
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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]]) {