]> git.saurik.com Git - cycript.git/blobdiff - Decode.cpp
Do not use corrupt struct to store type reference.
[cycript.git] / Decode.cpp
index 1af478c189a32c2bec57fbf07a59a925d1f515ad..cf58ad4bcff48e0b6859c7f27daa28fbebb225ca 100644 (file)
@@ -166,6 +166,11 @@ CYTypedIdentifier *Enum::Decode(CYPool &pool) const {
 CYTypedIdentifier *Aggregate::Decode(CYPool &pool) const {
     _assert(!overlap);
 
+    if (signature.count == _not(size_t)) {
+        _assert(name != NULL);
+        return $ CYTypedIdentifier($ CYTypeReference(CYTypeReferenceStruct, $I($pool.strdup(name))));
+    }
+
     CYTypeStructField *fields(NULL);
     for (size_t i(signature.count); i != 0; --i) {
         sig::Element &element(signature.elements[i - 1]);