From: Jay Freeman (saurik) Date: Wed, 4 Nov 2015 08:29:32 +0000 (-0800) Subject: Do not crash if ivar has no type encoding (Swift). X-Git-Tag: v0.9.504~21 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/991b6704bf8dc20fc262d2b94e6f8c2f6ce6a5d8 Do not crash if ivar has no type encoding (Swift). --- diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index 6440a59..4eec80b 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -2077,6 +2077,7 @@ static JSValueRef Internal_getProperty(JSContextRef context, JSObjectRef object, const char *encoding(ivar_getTypeEncoding(ivar)); _assert(encoding != NULL); + _assert(encoding[0] != '\0'); if (encoding[0] == 'b') { unsigned length, shift; CYBitField(length, shift, self, ivar, encoding, offset);