Skip to content

Commit

Permalink
Update known struct encoding prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Oct 14, 2024
1 parent ef3b36d commit 0bf7735
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/NSValue.m
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,13 @@ - (id) initWithCoder: (NSCoder *)coder
[coder decodeArrayOfObjCType: @encode(signed char)
count: size
at: (void*)objctype];
if (strncmp("{_NSSize=", objctype, 9) == 0)
if (strncmp(CGSIZE_ENCODING_PREFIX, objctype, strlen(CGSIZE_ENCODING_PREFIX)) == 0)
c = [abstractClass valueClassWithObjCType: @encode(NSSize)];
else if (strncmp("{_NSPoint=", objctype, 10) == 0)
else if (strncmp(CGPOINT_ENCODING_PREFIX, objctype, strlen(CGPOINT_ENCODING_PREFIX)) == 0)
c = [abstractClass valueClassWithObjCType: @encode(NSPoint)];
else if (strncmp("{_NSRect=", objctype, 9) == 0)
else if (strncmp(CGRECT_ENCODING_PREFIX, objctype, strlen(CGRECT_ENCODING_PREFIX)) == 0)
c = [abstractClass valueClassWithObjCType: @encode(NSRect)];
else if (strncmp("{_NSRange=", objctype, 10) == 0)
else if (strncmp(NSRANGE_ENCODING_PREFIX, objctype, strlen(NSRANGE_ENCODING_PREFIX)) == 0)
c = [abstractClass valueClassWithObjCType: @encode(NSRange)];
else
c = [abstractClass valueClassWithObjCType: objctype];
Expand Down

0 comments on commit 0bf7735

Please sign in to comment.