Skip to content

Commit be85d0a

Browse files
committed
Generalize computation of size with differing structure alignments
1 parent 557c7e5 commit be85d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/NumberDate.subproj/CFNumber.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType type, const vo
12021202
}
12031203
}
12041204

1205-
CFIndex size = 8 + ((!__CFNumberTypeTable[type].floatBit && __CFNumberTypeTable[type].storageBit) ? 8 : 0);
1205+
CFIndex size = (sizeof(struct __CFNumber) - sizeof(CFRuntimeBase)) + ((!__CFNumberTypeTable[type].floatBit && __CFNumberTypeTable[type].storageBit) ? 8 : 0);
12061206
#if OLD_CRAP_TOO
12071207
size += 2 * sizeof(void *);
12081208
#endif

0 commit comments

Comments
 (0)