]> git.saurik.com Git - cycript.git/blobdiff - sig/ffi_type.cpp
Don't crash if ivar_getTypeEncoding returns NULL.
[cycript.git] / sig / ffi_type.cpp
index 7abe6fdbadbf3263ea31ba3c2050d58aa58664bb..96f39bbbfaaa564a3575e308a8b7bd5e1893f4df 100644 (file)
@@ -119,7 +119,7 @@ ffi_type *ObjectiveC(CYPool &pool, struct Type *type) {
 ffi_type *Java(CYPool &pool, struct Type *type) {
     switch (type->primitive) {
         case typename_P: return &ffi_type_pointer;
-        case union_P: return &ffi_type_pointer;
+        case union_P: _assert(false); break;
         case string_P: return &ffi_type_pointer;
         case selector_P: return &ffi_type_pointer;
         case block_P: return &ffi_type_pointer;
@@ -132,10 +132,7 @@ ffi_type *Java(CYPool &pool, struct Type *type) {
         case ushort_P: return &ffi_type_ushort;
         case array_P: return &ffi_type_pointer;
         case pointer_P: return &ffi_type_pointer;
-
-        /* XXX: bit type */
-        case bit_P: return &ffi_type_uint;
-
+        case bit_P: _assert(false); break;
         case char_P: return &ffi_type_schar;
         case double_P: return &ffi_type_double;
         case float_P: return &ffi_type_double;