From 991b6704bf8dc20fc262d2b94e6f8c2f6ce6a5d8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 4 Nov 2015 00:29:32 -0800 Subject: [PATCH] Do not crash if ivar has no type encoding (Swift). --- ObjectiveC/Library.mm | 1 + 1 file changed, 1 insertion(+) 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); -- 2.47.2