handyJson引起的crash
作者:
ablac | 来源:发表于
2018-06-26 09:02 被阅读21次var nominalTypeDescriptor: NominalTypeDescriptor? {
let pointer = UnsafePointer<Int>(self.pointer)
let base = pointer.advanced(by: nominalTypeDescriptorOffsetLocation)
if base.pointee == 0 {
// swift class created dynamically in objc-runtime didn't have valid nominalTypeDescriptor
return nil
}
return NominalTypeDescriptor(pointer: relativePointer(base: base, offset: base.pointee-base.hashValue))
}
将offset:pointee 修改为将offset:base.pointee-base.hashValue
本文标题:handyJson引起的crash
本文链接:https://www.haomeiwen.com/subject/mihpyftx.html
网友评论